zoukankan      html  css  js  c++  java
  • ios-系统警告框 跳转到设置里面

    -(void)createUIAlertIphone:(NSString*)title
    {
        UIAlertController * alert =[UIAlertController alertControllerWithTitle:@"提示" message:title preferredStyle:UIAlertControllerStyleAlert];
        UIAlertAction * action =[UIAlertAction actionWithTitle:@"去开启" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
            
            NSURL * url = [NSURL URLWithString:UIApplicationOpenSettingsURLString];
            
            if([[UIApplication sharedApplication] canOpenURL:url]) {
                
                NSURL*url =[NSURL URLWithString:UIApplicationOpenSettingsURLString];           [[UIApplication sharedApplication] openURL:url];
            }
        }];
        UIAlertAction * action1 =[UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
        }];
        [alert addAction:action1];
        [alert addAction:action];
        [self presentViewController:alert animated:YES completion:nil];
    }
  • 相关阅读:
    Python with
    Python else
    Python list
    The Python Debugger Pdb
    RPM 包
    yum
    OpenStack I18N
    Python unittest
    MySQL 行格式
    MySQL 行溢出数据
  • 原文地址:https://www.cnblogs.com/sayimba/p/6053346.html
Copyright © 2011-2022 走看看