`
miss大为
  • 浏览: 80517 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

iOS5打开系统setting页面

 
阅读更多
iOS5的SDK现在可以直接打开setting页面了,以往的SDK则不可以,当时我还花了大量时间去实现,结果不了了之。
如果你想打开Location Services的setting页面,代码如下:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs:root=LOCATION_SERVICES"]];  


如果想打开Twitter的设置:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs:root=TWITTER"]];  


如果想打开蓝牙的设置:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs:root=General&path=Bluetooth"]];  


当然你还可以打开应用的设置:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs:root=Apps&path=Your+App+Display+Name"]];  


Your+App+Display+Name是什么,你应懂的。 不过我试这个的时候没有打开应用的setting,反而打开的是系统setting页,不知道为何。
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics