[翻译] KGModal
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相关推荐
- Mysql函数group_concat、find_in_set 多值分隔字符字段进行数据库字段值翻译
Mysql函数group_concat.find_in_set进行数据库字段值翻译 场景 配方表:记录包含的原料 sources表示原料,字段值之间用逗号分隔 原料表:对应原料id和原料名称 现需要查 ...
- “Attention is All You Need 翻译
<p><img src="output_0_0.png" alt="png"></p> "Attention is ...
- 基于PyTorch的Seq2Seq翻译模型详细注释介绍(一)
版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明. 本文链接:https://blog.csdn.net/qysh123/article/deta ...
- 全文翻译(全文合集):TVM: An Automated End-to-End Optimizing Compiler for Deep Learning
全文翻译(全文合集):TVM: An Automated End-to-End Optimizing Compiler for Deep Learning 摘要 人们越来越需要将机器学习应用到各种各样 ...
- 全文翻译(四) TVM An Automated End-to-End Optimizing Compiler
全文翻译(四) TVM An Automated End-to-End Optimizing Compiler 6.3 嵌入式GPU评估 对于移动GPU实验,在配备ARM Mali-T860MP4 G ...
- 全文翻译(三) TVM An Automated End-to-End Optimizing Compiler
全文翻译(三) TVM An Automated End-to-End Optimizing Compiler 5. 自动化优化 考虑到一组丰富的调度原语,剩下的问题是为DL模型的每一层,找到最佳的算 ...
- 全文翻译(二): TVM: An Automated End-to-End Optimizing Compiler for Deep Learning
全文翻译(二): TVM: An Automated End-to-End Optimizing Compiler for Deep Learning 3.优化计算图 计算图是在DL框架中表示程序的常 ...
- 全文翻译(一):TVM: An Automated End-to-End Optimizing Compiler for Deep Learning
全文翻译(一):TVM: An Automated End-to-End Optimizing Compiler for Deep Learning 摘要 人们越来越需要将机器学习应用到各种各样的硬件 ...
- YOLOv4全文阅读(全文中文翻译)
YOLOv4全文阅读(全文中文翻译) YOLOv4: Optimal Speed and Accuracy of Object Detection 论文链接: https://arxiv.org/pd ...
最新文章
- 〖Linux〗Kubuntu, the application 'Google Chrome' has requested to open the wallet 'kdewallet'解决方法...
- ReentrantReadWriteLock
- 柳传志大声对iphone说:这是在中国!
- wsl 安装linux 子系统
- vim 代码提示功能,让vim可以媲美IDE
- 网页中设定表格边框的厚度的属性_网页试题
- 解决Tomcat8及Tomcat7下http的post、get请求中参数中文乱码问题
- JAVA之运算符优先级
- python数据分析之(5)scipy
- java给图片增加水印(图片水印,文字水印)
- JAVA实现简易文本编辑器设计
- jspstudy启动mysql失败_二、MySQL启动失败故障思路
- Windows - 强力删除文件
- 安卓9.0刷linux,Android 9.0 内核编译实战(以一加6为例)
- 文件上传漏洞---Web渗透学习
- nginx 使用详细解
- 如何记账并生成收入、支出的图表
- 34万奖金!第三届厦门国际银行数创金融杯金融营销大赛来啦!
- 四十九、HBase介绍
- 一加手机怎么root权限_一加五,怎么获取ROOT权限