zoukankan      html  css  js  c++  java
  • UIAlertController

     
      

    专题 UIAlertController

      

    // iOS8之前
    
        // UIAlertView
    
        // UIActionSheet;
    
        
    
        // iOS8开始
    
        // UIAlertController == UIAlertView + UIActionSheet
    
        UIAlertController *alert = [UIAlertController alertControllerWithTitle:nil message:nil preferredStyle:UIAlertControllerStyleActionSheet];
    
        
    
        // 添加按钮
    
        [alert addAction:[UIAlertAction actionWithTitle:@"收藏" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
    
            XMGLog(@"点击了[收藏]");
    
        }]];
    
        [alert addAction:[UIAlertAction actionWithTitle:@"举报" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
    
            XMGLog(@"点击了[举报]");
    
        }]];
    
        [alert addAction:[UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
    
            XMGLog(@"点击了[取消]");
    
        }]];
    
        
    
        [self.window.rootViewController presentViewController:alert animated:YES completion:nil];

     

       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
  • 相关阅读:
    volatile详解
    Java并发之AQS详解
    Thread详解
    Hibernate检索策略
    Hibernate查询方式
    Hibernate--对象关系
    hibernate--hibernate.cfg.xml常用配置详解
    hibernate--CRUD初体验
    hibernate--HelloWorld
    Struts支持的contentType
  • 原文地址:https://www.cnblogs.com/developer-ios/p/4917759.html
Copyright © 2011-2022 走看看