zoukankan      html  css  js  c++  java
  • UIAlertController 使用

            UIAlertController  *alertVC = [UIAlertController alertControllerWithTitle:nil message:nil preferredStyle:UIAlertControllerStyleActionSheet] ;

            

            [alertVC addAction:[UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:^(UIAlertAction *  action) {

                    NSLog(@"点击 取消 ");

            }]];

            

            [alertVC addAction:[UIAlertAction actionWithTitle:@"拍照" style:UIAlertActionStyleDestructive handler:^(UIAlertAction *  action) {

                NSLog(@"拍照 ");

                [weakself loadPictureFromCarmeral];

            }]];

            

            [alertVC addAction:[UIAlertAction actionWithTitle:@"从手机相册选择" style:UIAlertActionStyleDefault handler:^(UIAlertAction *  action) {

                NSLog(@"点击 从手机相册选择 ");

                

                [weakself  getImageFromAlbum];

                

            }]];

            [self presentViewController:alertVC animated:YES completion:nil];

     
  • 相关阅读:
    嵌入式为什么要用Linux操作系统
    SPI 协议的理解
    跳转某指定地址、给某绝对地址赋值
    define 宏定义
    笔试--编程题
    spring 技巧集锦
    spring data jpa auditing
    spring security
    Python基础笔记
    调试EF源代码环境配置
  • 原文地址:https://www.cnblogs.com/iOS-mt/p/5482073.html
Copyright © 2011-2022 走看看