UIAlertController的使用
来源:互联网 发布:知乎入门级古典音乐 编辑:程序博客网 时间:2024/06/06 00:05
样式一:
UIAlertController* alert = [UIAlertController alertControllerWithTitle:nil message:nil preferredStyle:UIAlertControllerStyleActionSheet];
UIAlertAction* phone = [UIAlertAction actionWithTitle:@"客服-4006200365" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
NSMutableString* str=[[NSMutableString alloc] initWithFormat:@"telprompt://%@",@"4006200365"];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:str]];
}];
UIAlertAction* cancel = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:nil];
[alert addAction:phone];
[alert addAction:cancel];
[self presentViewController:alert animated:YES completion:nil];
UIAlertController* alert = [UIAlertController alertControllerWithTitle:nil message:@"权限码(参见出厂文件Admin Code)" preferredStyle:UIAlertControllerStyleAlert];
[alert addTextFieldWithConfigurationHandler:^(UITextField * _Nonnull textField) {
textField.placeholder = @"权限码(参见出厂文件Admin Code)";
}];
[alert addTextFieldWithConfigurationHandler:^(UITextField * _Nonnull textField) {
textField.placeholder = @"000000";
textField.secureTextEntry = YES;
}];
UIAlertAction* confirm = [UIAlertAction actionWithTitle:@"确定 Yes" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
//
}];
UIAlertAction* cancel = [UIAlertAction actionWithTitle:@"取消 Cancel" style:UIAlertActionStyleCancel handler:nil];
[alert addAction:confirm];
[alert addAction:cancel];
[self presentViewController:alert animated:YES completion:nil];
- UIAlertController的使用(Swift)
- UIAlertController的使用示例
- UIAlertController的使用二
- UIAlertController的使用
- UIAlertController的使用
- 关于UIAlertController的使用
- UIAlertController的使用
- UIAlertController 的使用
- UIAlertController 的使用
- UIAlertController的使用
- swift 的 UIAlertController使用
- UIAlertController的使用
- UIAlertController的使用
- UIAlertController的使用
- UIAlertController的使用
- UIAlertController 的使用
- UIAlertController的简单使用
- UIAlertController的使用
- 字符串置换
- Android获取屏幕分辨率
- linux c语言查找指定程序pid
- 二叉查找树的实现
- dpkg: 处理归档 /var/cache/apt/archives/软件名 (--unpack)时出错
- UIAlertController的使用
- Android单击通知栏后返回正在运行的程序并跳转到指定fragment页面
- JS(十一)事件类型
- JavaScript对象【基础】
- form表单的两种提交方式,submit和button的用法
- Android OpenGL显示任意3D模型文件
- kotlin 构造
- 异常处理
- Android多线程-AsyncTask的使用和问题(取消,并行和串行,屏幕切换)