UIAlertController
2016-03-09 14:53
337 查看
UIAlertController * alert =[UIAlertController alertControllerWithTitle:@"新建相册" message:@"请输入新建相册的名字" preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"cancel" style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
}];
UIAlertAction *otherAction = [UIAlertAction actionWithTitle:@"ok" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
}];
[alert addAction:cancelAction];
[alert addAction:otherAction];
[alert addTextFieldWithConfigurationHandler:nil];
[self presentViewController:alert animated:YES completion:nil];
UIAlertController * alert =[UIAlertController alertControllerWithTitle:@"选择方式" message:@"" preferredStyle:UIAlertControllerStyleActionSheet];
UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"cancel" style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
}];
UIAlertAction *photoLibraryAction = [UIAlertAction actionWithTitle:@"从相册读取" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
}];
UIAlertAction *takePhotoAction = [UIAlertAction actionWithTitle:@"拍照" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
}];
[alert addAction:cancelAction];
[alert addAction:takePhotoAction];
[alert addAction:photoLibraryAction];
[self presentViewController:alert animated:YES completion:nil];
相关文章推荐
- BuiltWith
- 【bzoj1670】[Usaco2006 Oct]Building the Moat护城河的挖掘 凸包
- Android Volley完全解析(三),定制自己的Request
- HTML--11marquee标签
- com.mysql.jdbc.PacketTooBigException: Packet for query is too large (4200044 > 1048576). You can cha
- Django中远程服务器访问bad request
- 《iOS Human Interface Guidelines》——Scope Bar
- UICollectionView中layoutsubView的坑
- 1062. Talent and Virtue (25) 排序
- 《iOS Human Interface Guidelines》——Search Bar
- PHP中的break与continue
- Longest Consecutive Sequence
- 22.手势识别之UIPinchGestureRecognizer
- easyUI Combobox
- SurfaceView你所应该知道的事
- array_count_values() 函数
- UICollectionView cellForItemAtIndexPath 方法不走
- UITableView总结
- UIview需要知道的一些事情:setNeedsDisplay、setNeedsLayout
- EffectiveAndroidUI/UI框架