ios-封装系统的alert--好用的alert.zip
系统的UIAlert不太好用,写起来感觉太零散. 使用方法:case 0: [LTAlertView showTitle:@"LTAlert" message:@"我是普通alert" ButtonTitles:@[@"确认",@"取消"] OnTapBlock:^(LTAlertView* alert,NSInteger num) { NSLog(@"点击了第%d个按钮",num); }]; break; case 1: [LTAlertView showConfigBlock:^(LTAlertView *alertView) { alertView.alertViewStyle = UIAlertViewStyleSecureTextInput; } Title:@"LTAlert" message:@"带密码输的alert" ButtonTitles:@[@"确定",@"取消"] OnTapBlock:^(LTAlertView* alert,NSInteger num) { NSString* str = [alert textFieldAtIndex:0].text; NSLog(@"输入的文字是%@,点击了第%d个按钮",str,num); }]; break; case 2: [LTAlertView showConfigBlock:^(LTAlertView *alertView) { alertView.alertViewStyle = UIAlertViewStylePlainTextInput; } Title:@"LTAlert" message:@"带输入的alert" ButtonTitles:@[@"确定",@"取消"] OnTapBlock:^(LTAlertView* alert,NSInteger num) { NSString* str = [alert textFieldAtIndex:0].text; NSLog(@"输入的文字是%@,点击了第%d个按钮",str,num); }]; break; case 3: [LTAlertView showConfigBlock:^(LTAlertView *alertView) { alertView.alertViewStyle = UIAlertViewStyleLoginAndPasswordInput; alertView.backgroundColor = [UIColor redColor]; } Title:@"LTAlert" message:@"弹出带输入的alert" ButtonTitles:@[@"确定",@"取消"] OnTapBlock:^(LTAlertView* alert,NSInteger num) { NSString* accountStr = [alert textFieldAtIndex:0].text; NSString* passwordStr =[alert textFieldAtIndex:1].text; NSLog(@"账号是%@,密码是%@",accountStr,passwordStr); }]; break;
- 1
- 粉丝: 509
- 资源: 1万+
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助