Opening IOS settings preferences

為{幸葍}努か 提交于 2020-02-23 07:40:47

问题


Im having a problem opening the settings preferences in my IOS iphone app. At the moment im just using a simple button to test and it doesn't seem to be working correctly.

Basically when I click the button I want a specific settings preference page to open. This is what Im currently using within my buttons IBACTION:

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs:root=General"]];

Hope you guys can help me out with a solution for this, thanks in advance.


回答1:


try this:

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs://"]];

should work in iOS 5

... update:

opening with the prefs url was disabled in iOS 5.1

sebastian



来源:https://stackoverflow.com/questions/10055853/opening-ios-settings-preferences

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!