zoukankan      html  css  js  c++  java
  • UIAlertController

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

  • 相关阅读:
    收缩清空数据库
    ExecuteScalar 返回值问题
    JS“缺少标识符 字符串或数字”错误
    Access判断空字符串的SQL语句
    decimal与 float的区别
    按照特定的字符拆分字段
    php中heredoc与nowdoc的使用方法
    php 类接口继承练习
    委托
    关闭form前提示是否保存
  • 原文地址:https://www.cnblogs.com/damonWq/p/5342976.html
Copyright © 2011-2022 走看看