UIAlertController的使用二
2015-07-28 18:57
351 查看
UIAlertController *actionSheetController = [UIAlertController alertControllerWithTitle:@"action选项" message:nil
preferredStyle:UIAlertControllerStyleActionSheet];
UIAlertAction *action0 = [UIAlertAction
actionWithTitle:@"选项一"
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
[self customMethod1];
}];
[actionSheetController addAction:action0];
UIAlertAction *action = [UIAlertAction
actionWithTitle:@"选项二"
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
[self <span style="font-family: Arial, Helvetica, sans-serif;">customMethod2</span>];
}];
UIAlertAction *action1 = [UIAlertAction
actionWithTitle:@"选项三"
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
[self customMethod3];
}];
UIAlertAction *actionCancel = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel
handler:^(UIAlertAction * action) {}];
[actionSheetController addAction:action];
[actionSheetController addAction:action1];
[actionSheetController addAction:actionCancel];
[actionSheetController.view
setTintColor:[UIColor
greenColor]];
[self
presentViewController:actionSheetController
animated:YES
completion:nil];
preferredStyle:UIAlertControllerStyleActionSheet];
UIAlertAction *action0 = [UIAlertAction
actionWithTitle:@"选项一"
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
[self customMethod1];
}];
[actionSheetController addAction:action0];
UIAlertAction *action = [UIAlertAction
actionWithTitle:@"选项二"
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
[self <span style="font-family: Arial, Helvetica, sans-serif;">customMethod2</span>];
}];
UIAlertAction *action1 = [UIAlertAction
actionWithTitle:@"选项三"
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
[self customMethod3];
}];
UIAlertAction *actionCancel = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel
handler:^(UIAlertAction * action) {}];
[actionSheetController addAction:action];
[actionSheetController addAction:action1];
[actionSheetController addAction:actionCancel];
[actionSheetController.view
setTintColor:[UIColor
greenColor]];
[self
presentViewController:actionSheetController
animated:YES
completion:nil];
相关文章推荐
- 【IOS】 遍历info 所有内容 && 唯一的节能设备UUID
- iOS 在UILabel显示不同的字体和颜色(转)
- 将GPIUmage集成到项目中
- UIAlertController的用法
- iOS UI 第二课 UITextField UIButton
- iOS-UI-04 沙盒 归档 解归档
- 黑马程序员——自学总结(七)图形用户界面GUI
- Mapped Statements collection does not contain value for
- easyui form表单提交中文乱码
- apue-第十章 信号 笔记
- SpannableStringBuilder
- 232 Implement Queue using Stacks
- Error running 'requirements_osx_brew_update_system '
- hdoj- Windows Message Queue
- hdoj- Windows Message Queue
- UI及美术部分资源命名规范:
- Windows Message Queue(优先队列)
- map容器按value值排序
- OpenCV库highgui函数在VS2012下的内存泄露问题!
- 自定义UITableView各种函数