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

  • 相关阅读:
    做一名「技术掮客」去变现自己的技术
    又一流氓推广Microsoft Edge,我勒个去
    拿什么心情来阅读我的代码(程序员的必备心理技能)
    发现与研究的基石
    VBA小技巧
    从明天起,让我们做一名调包侠
    设计模式之“Observer”注疏#01
    mybatis-dynamic-query 3.0 更新
    TiDB入门(四):从入门到“跑路”
    利用typescript生成Swagger文档
  • 原文地址:https://www.cnblogs.com/huoran1120/p/5258186.html
Copyright © 2011-2022 走看看