App运行过程中需要更改System Setting(swift)
来源:互联网 发布:c图形界面编程 编辑:程序博客网 时间:2024/06/03 10:33
在用户使用App过程中,比如需要开启定位呀,通知呀,可以在应用内直接打开Setting, 而不用进入后台再一步一步来设置,配合iOS9的新特性(左上角的返回按钮)很方便。
let alertController = UIAlertController(title: "Sad", message: "Please enable it in Settings", preferredStyle: .Alert)let settingAction = UIAlertAction(title: "Settings", style: .Default) { (settingAction) -> Void in if let appSettings = NSURL(string: UIApplicationOpenSettingsURLString){UIApplication.sharedApplication().openURL(appSettings) } } alertController.addAction(settingAction) let cancelAction = UIAlertAction(title: "Cancel",style: .Cancel,handler: nil) alertController.addAction(cancelAction) presentViewController(alertController, animated: true, completion: nil)
0 0
- App运行过程中需要更改System Setting(swift)
- 在iOS app中运行Python文件(Swift+Objective C+Python)
- 如何将Metro 程序需要的文件加入到app运行目录(AppX文件夹中)
- 第三方app内置到system/priv-app或者system/app中无法正常运行的问题。
- 运行APP时dex2oat过程中DumpLIRInsn函数出错
- 项目运行时更改app图标
- 【框架】App运行过程解析
- Android实现app内部更改系统时间(需要手机root)
- win7 需要来自SYSTEM的权限才能对文件更改
- C#用代码在程序运行过程中更改程序的图标
- MyEclipse中JAR System library 怎么更改
- android setting system Language
- 运行APP时dex2oat过程中无法在系统中创建文件夹
- android push需要安装的apk到system/app以及删除system/app下的apk
- Xcode调试运行和打包归档过程中需要设置的地方
- 解决在Setting界面中打开bluetooth 导致setting界面以外退出问题的过程
- 每次运行appium时需要安装unlock,setting,inputmanager三个apk文件的解决方法
- app在android 6.0或以上平台版本运行过程中请求权限
- PLSQL 64位的安装
- Windows安装spf13-vim配置教程
- 动态jsp生成静态html网页
- HTML5、微信、APP:创业寒冬只能选其一,该选哪个?
- Swift 2.0 函数 定义、调用、参数返回值、函数类型、嵌套函数
- App运行过程中需要更改System Setting(swift)
- 解决pandas调用scipy时缺少动态运行库的问题
- 一个超轻量级将日期时间转换为相对时间的jquery插件
- nyoj 237
- 游戏开发-jungle runner 山寨版-部分注意点
- qrCode生成二维码
- android 之截屏
- core文件来调试segment fault
- hibernate之insert和update控制实战