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

  • 相关阅读:
    HDU1294 Rooted Trees Problem(整数划分 组合数学 DP)
    HDU2546 饭卡(背包)
    经典动态规划总结
    POJ1285 Combinations, Once Again(背包 排列组合)
    计数 组合数学总结
    莫队算法 2038: [2009国家集训队]小Z的袜子(hose)
    循环-24. 求给定序列前N项和之二
    循环-23. 找完数
    循环-22. 输出闰年
    循环-21. 求交错序列前N项和
  • 原文地址:https://www.cnblogs.com/huoran1120/p/5258186.html
Copyright © 2011-2022 走看看