KGModal

KGModal is an easy drop in control that allows you to display any view in a modal popup. The modal will automatically scale to fit the content view and center it on screen with nice animations!

KGModal允许你用pop出你的view,要显示的view会自动的缩放到合适的级别,并在屏幕中间,动画效果很炫哦!

You supply your own content view and KGModal does the rest:

你需要提供你的内容view,之后就交给KGModal就行了:

[[KGModal sharedInstance] showWithContentView:contentView andAnimated:YES];

There are a couple other options but it's purposely designed to be simple and easy to use:

当然,还有好多其他属性供你设置,使用起来很简单哦:

// Determines if the modal should dismiss if the user taps outside of the modal view
// Defaults to YES
@property (nonatomic) BOOL tapOutsideToDismiss;// Determines if the close button or tapping outside the modal should animate the dismissal
// Defaults to YES
@property (nonatomic) BOOL animateWhenDismissed; // Determins close button type (None/Left/Right) // Defaults to Left @property (nonatomic) KGModalCloseButtonType closeButtonType; // Determines whether close button will display on the left or right // Defaults to left @property (nonatomic) KGModalCloseButtonLocation closeButtonLocation; // The background color of the modal window // Defaults black with 0.5 opacity @property (strong, nonatomic) UIColor *modalBackgroundColor; // The background display style, can be a transparent radial gradient or a transparent black // Defaults to gradient, this looks better but takes a bit more time to display on the retina iPad @property (nonatomic) enum KGModalBackgroundDisplayStyle backgroundDisplayStyle; // The shared instance of the modal + (id)sharedInstance; // Set the content view to display in the modal and display with animations - (void)showWithContentView:(UIView *)contentView; // Set the content view to display in the modal and whether the modal should animate in - (void)showWithContentView:(UIView *)contentView andAnimated:(BOOL)animated; // Hide the modal with animations - (void)hide; // Hide the modal with animations, // run the completion after the modal is hidden - (void)hideWithCompletionBlock:(void(^)())completion; // Hide the modal and whether the modal should animate away - (void)hideAnimated:(BOOL)animated; // Hide the modal and whether the modal should animate away, // run the completion after the modal is hidden - (void)hideAnimated:(BOOL)animated withCompletionBlock:(void(^)())completion;

Check out the ExampleApp to see it in action!

你可以在ExampleApp中查看效果!

Installation via Cocoapods 通过Cocoapods来安装

Add pod 'KGModal', '~> 0.0.1' to your Podfile and run pod to install.

添加 KGModal ,然后运行pod来安装。

[翻译] KGModal相关推荐

  1. Mysql函数group_concat、find_in_set 多值分隔字符字段进行数据库字段值翻译

    Mysql函数group_concat.find_in_set进行数据库字段值翻译 场景 配方表:记录包含的原料 sources表示原料,字段值之间用逗号分隔 原料表:对应原料id和原料名称 现需要查 ...

  2. “Attention is All You Need 翻译

    <p><img src="output_0_0.png" alt="png"></p> "Attention is ...

  3. 基于PyTorch的Seq2Seq翻译模型详细注释介绍(一)

    版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明. 本文链接:https://blog.csdn.net/qysh123/article/deta ...

  4. 全文翻译(全文合集):TVM: An Automated End-to-End Optimizing Compiler for Deep Learning

    全文翻译(全文合集):TVM: An Automated End-to-End Optimizing Compiler for Deep Learning 摘要 人们越来越需要将机器学习应用到各种各样 ...

  5. 全文翻译(四) TVM An Automated End-to-End Optimizing Compiler

    全文翻译(四) TVM An Automated End-to-End Optimizing Compiler 6.3 嵌入式GPU评估 对于移动GPU实验,在配备ARM Mali-T860MP4 G ...

  6. 全文翻译(三) TVM An Automated End-to-End Optimizing Compiler

    全文翻译(三) TVM An Automated End-to-End Optimizing Compiler 5. 自动化优化 考虑到一组丰富的调度原语,剩下的问题是为DL模型的每一层,找到最佳的算 ...

  7. 全文翻译(二): TVM: An Automated End-to-End Optimizing Compiler for Deep Learning

    全文翻译(二): TVM: An Automated End-to-End Optimizing Compiler for Deep Learning 3.优化计算图 计算图是在DL框架中表示程序的常 ...

  8. 全文翻译(一):TVM: An Automated End-to-End Optimizing Compiler for Deep Learning

    全文翻译(一):TVM: An Automated End-to-End Optimizing Compiler for Deep Learning 摘要 人们越来越需要将机器学习应用到各种各样的硬件 ...

  9. YOLOv4全文阅读(全文中文翻译)

    YOLOv4全文阅读(全文中文翻译) YOLOv4: Optimal Speed and Accuracy of Object Detection 论文链接: https://arxiv.org/pd ...

最新文章

  1. 〖Linux〗Kubuntu, the application 'Google Chrome' has requested to open the wallet 'kdewallet'解决方法...
  2. ReentrantReadWriteLock
  3. 柳传志大声对iphone说:这是在中国!
  4. wsl 安装linux 子系统
  5. vim 代码提示功能,让vim可以媲美IDE
  6. 网页中设定表格边框的厚度的属性_网页试题
  7. 解决Tomcat8及Tomcat7下http的post、get请求中参数中文乱码问题
  8. JAVA之运算符优先级
  9. python数据分析之(5)scipy
  10. java给图片增加水印(图片水印,文字水印)
  11. JAVA实现简易文本编辑器设计
  12. jspstudy启动mysql失败_二、MySQL启动失败故障思路
  13. Windows - 强力删除文件
  14. 安卓9.0刷linux,Android 9.0 内核编译实战(以一加6为例)
  15. 文件上传漏洞---Web渗透学习
  16. nginx 使用详细解
  17. 如何记账并生成收入、支出的图表
  18. 34万奖金!第三届厦门国际银行数创金融杯金融营销大赛来啦!
  19. 四十九、HBase介绍
  20. 一加手机怎么root权限_一加五,怎么获取ROOT权限

热门文章

  1. java递归看回文,如何使用正则表达式实现递归回文检查器? [关闭]
  2. gitlab上传本地项目_环境搭建:gitLab平台的搭建和简单使用
  3. 异步fifo_FIFO工作的原理
  4. mysql 备份数据
  5. pageoffice提示网络连接意外错误
  6. 基于流程的多维度企业管理框架(第三稿)
  7. 世界首个机器人观音在岛国问世,请问AI开光还会远吗?
  8. 干货警告!476个PyTorch资源大合集推荐,GitHub超过3600星
  9. 无人驾驶、免费乘坐,硅谷的出租车行业要变天了
  10. 在硅谷谈AI不够有创意,到苹果开吐槽大会 | 跟着李开复去硅谷