微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

HDAlertView 类似 iOS alertView 弹窗组件

程序名称:HDAlertView

授权协议: MIT

操作系统: iOS

开发语言: Objective-C

HDAlertView 介绍

HDalertView是一个类似系统alertView弹窗。

系统自带UIAlertView有常见BUG, 比如和系统键盘动画冲突等等, 需要代理操作等诸多不方便使用.
使用UIAlertController就不会有UIAlertView等等问题, 但是又不支持iOS7.所以才自定义一个类似系统的UIAlertView,
用法和UIAlertController相似, 而且简单.

示例代码

HDalertView *alertView = [HDalertView alertViewWithTitle:@"HDalertView" andMessage:@"similar system UIAlertView"];

 [alertView addButtonWithTitle:@"ok" type:HDalertViewButtonTypeDefault handler:^(HDalertView *alertView) {
     NSLog(@"ok");
 }];

 [alertView addButtonWithTitle:@"cancel" type:HDalertViewButtonTypeDefault handler:^(HDalertView *alertView) {
     NSLog(@"cancel");
 }];

 [alertView show];

如果在使用过程中遇到BUG,
希望你能Issues我. 如果对你有所帮助请Star

HDAlertView 官网

https://github.com/Bruce-7/HDAlertView

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐