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];

     
  • 相关阅读:
    去除inline-block出现间距的几种方法
    vscode插件和快捷键
    es6三个点运算符
    jq返回顶部
    jq版轮播图
    js动态操作DOM
    js中的闭包
    es6之箭头函数
    in和hasOwnProperty的区别
    改变this指向的三种方法
  • 原文地址:https://www.cnblogs.com/iOS-mt/p/5482073.html
Copyright © 2011-2022 走看看