• UIAlertController


    UIAlertView iOS9.0之后注销了,简单介绍一下UIAlertController的使用:

     //提醒控制器类型有两种UIAlertControllerStyleActionSheet和UIAlertControllerStyleAlert
      UIAlertController *alertC=[UIAlertController alertControllerWithTitle:@"" message:@"" preferredStyle:UIAlertControllerStyleActionSheet];  
     //
      UIAlertController *alert=[UIAlertController alertControllerWithTitle:@"title" message:@"message" preferredStyle:UIAlertControllerStyleAlert];
       
     //
      UIAlertAction *cancel=[UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action){
            
        }];
    
     //添加动作
        [alert addAction:cancel];
     //添加textfield
        [alert addTextFieldWithConfigurationHandler:^(UITextField *text){
            
        }];
     //展示提醒控制器
        [self presentViewController:alert animated:YES completion:nil];
  • 相关阅读:
    SQL 脚本 重复执行 约束
    xiami 精选集
    PHP 5 环境配置
    Thread线程类
    创建线程
    C#中简单的正则表达式(也经常会用到的)
    线程的挂起与恢复
    C#操作INI文件
    多线程简介
    单线程简介
  • 原文地址:https://www.cnblogs.com/sunjianfei/p/5570853.html
Copyright © 2020-2023  润新知