HDAlertView 3.0

HDAlertView 3.0

测试已测试
语言语言 Obj-CObjective C
许可证 MIT
发布上次发布2017年11月

HeDong1117维护。



  • 作者
  • HeDong

HDAlertView

HDAlertView 是一个类似系统、微信、QQ 等等 App 的 alertView 弹窗。

演示

演示

示例

 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];

CocoaPods

推荐使用 CocoaPods 进行安装

platform :ios, '7.0'

target :'your project' do

pod 'HDAlertView'

end

Pod install

手动导入

  1. 通过 Clone 或下载下载 HDAlertView 文件夹内的所有内容。
  2. 将 HDAlertView 内的源文件添加(拖放)到您的工程中。
  3. 导入 "#import "HDAlertView.h""。

补充

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

如果在使用过程中遇到 Bug,希望您能 Issues 我。如果对您有所帮助请 Star。
Sina : @小七柒_7

许可证

HDAlertView 是基于 MIT 许可证发布的。有关详细信息,请参阅 LICENSE 文件。