From: http://www.cocoachina.com/newbie/basic/2011/1108/3467.html

 

 

原文链接:http://blog.csdn.net/favormm/article/details/6940226


iOS5的SDK现在可以直接打开setting页面了,以往的SDK则不可以,当时我还花了大量时间去实现,结果不了了之。

iOS5打开系统setting页面
 
 

如果你想打开Location Services的setting页面,代码如下:

  1. [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs:root=LOCATION_SERVICES"]];  

如果想打开Twitter的设置:

  1. [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs:root=TWITTER"]];  

如果想打开蓝牙的设置:

  1. [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs:root=General&path=Bluetooth"]];  

当然你还可以打开应用的设置:

  1. [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs:root=Apps&path=Your+App+Display+Name"]];  

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

相关文章:

  • 2022-01-16
  • 2022-12-23
  • 2021-11-26
  • 2021-07-19
  • 2022-02-08
  • 2021-09-21
  • 2021-08-18
  • 2021-05-21
猜你喜欢
  • 2022-12-23
  • 2021-12-25
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-07
  • 2022-12-23
相关资源
相似解决方案