TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Nov 2017 |
Maintained by HeDong1117.
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安装
platform :ios, '7.0'
target :'your project' do
pod 'HDAlertView'
end
Pod install
系统自带UIAlertView有常见BUG, 比如和系统键盘动画冲突等等, 需要代理操作等诸多不方便使用. 使用UIAlertController就不会有UIAlertView等等问题, 但是又不支持iOS7.所以才自定义一个类似系统的UIAlertView, 用法和UIAlertController相似, 而且简单.
HDAlertView is released under the MIT license. See LICENSE for details.