iOS --弹框1
2015-11-10 09:03
495 查看
//从底部弹出
UIAlertController *sheetController = [UIAlertController
alertControllerWithTitle:@"请选择图片"
message:nil
preferredStyle:UIAlertControllerStyleActionSheet];
UIAlertAction *saveAction = [UIAlertAction
actionWithTitle:@"拍照"
style:UIAlertActionStyleDefault
handler:^(UIAlertAction *action) {
NSLog(@"保存");
}];
UIAlertAction *deleteAction = [UIAlertAction
actionWithTitle:@"相册"
style:UIAlertActionStyleDestructive
handler:^(UIAlertAction *action) {
NSLog(@"删除");
}];
UIAlertAction *cancelAction = [UIAlertAction
actionWithTitle:@"取消"
style:UIAlertActionStyleCancel
handler:nil];
[sheetController addAction:saveAction];
[sheetController addAction:deleteAction];
[sheetController addAction:cancelAction];
[self
presentViewController:sheetController animated:YES
completion:nil];
UIAlertController *sheetController = [UIAlertController
alertControllerWithTitle:@"请选择图片"
message:nil
preferredStyle:UIAlertControllerStyleActionSheet];
UIAlertAction *saveAction = [UIAlertAction
actionWithTitle:@"拍照"
style:UIAlertActionStyleDefault
handler:^(UIAlertAction *action) {
NSLog(@"保存");
}];
UIAlertAction *deleteAction = [UIAlertAction
actionWithTitle:@"相册"
style:UIAlertActionStyleDestructive
handler:^(UIAlertAction *action) {
NSLog(@"删除");
}];
UIAlertAction *cancelAction = [UIAlertAction
actionWithTitle:@"取消"
style:UIAlertActionStyleCancel
handler:nil];
[sheetController addAction:saveAction];
[sheetController addAction:deleteAction];
[sheetController addAction:cancelAction];
[self
presentViewController:sheetController animated:YES
completion:nil];
相关文章推荐
- 小技巧3-iOS 获取当前系统时间
- iOS --自定义xib
- iOS 获取文件的目录路径的几种方法 [转]
- (NO.00003)iOS游戏简单的机器人投射游戏成形记(三)
- (NO.00003)iOS游戏简单的机器人投射游戏成形记(三)
- (NO.00003)iOS游戏简单的机器人投射游戏成形记(三)
- (NO.00003)iOS游戏简单的机器人投射游戏成形记(二)
- (NO.00003)iOS游戏简单的机器人投射游戏成形记(二)
- (NO.00003)iOS游戏简单的机器人投射游戏成形记(二)
- (NO.00003)iOS游戏简单的机器人投射游戏成形记(一)
- (NO.00003)iOS游戏简单的机器人投射游戏成形记(一)
- (NO.00003)iOS游戏简单的机器人投射游戏成形记(一)
- IOS跳转到评分页面
- iOS Crash文件分析
- 做一个绕Y轴旋转的动画时遇到问题
- iOS开发系列--通知与消息机制
- OC中方法与函数的区别
- iOS程序进入后台后仍运行定时器NSTimer
- 蜂窝教育iOS培训 助你成就高薪梦想
- ios开发是更加“省时”的编程方式