3rd:
AlertController (Push AlertController to the topmost visible window)
UIAlertView+IABlocks ([Custom UIAlertView with block callback,avoid UIAlertview delegate crash] (http://stackoverflow.com/questions/14063389/custom-uialertview-with-block-callback))
Ref:
实现对UIAlertController和UIAlertView判断系统后的简单封装
- CommonUIAlert.h
- CommonUIAlert.m
- AlertController.h
- AlertController.m
- UIAlertView+IABlocks.h
- UIAlertView+IABlocks.m
[[CommonUIAlert alloc] showCommonAlertViewMessage:@"用户名不能为空!"];
[[CommonUIAlert alloc] showCommonAlertViewTitle:@"温馨提示" message:@"有新版本,请更新应用" cancelButtonTitle:@"取消" otherButtonTitle:@"确认" cancle:^(){
} confirm:^(){
}];
- (void)showCommonAlertViewMessage:(NSString *)message;
-(void)showCommonAlertViewTitle:(NSString *)title message:(NSString *)message cancelButtonTitle:(NSString *)cancelButtonTitle otherButtonTitle:(NSString *)otherButtonTitle
cancle:(void (^)())cancle confirm:(void (^)())confirm;