打开IOS设置首选项(Opening IOS settings preferences)

编程入门 行业动态 更新时间:2024-10-28 01:12:22
打开IOS设置首选项(Opening IOS settings preferences)

我在IOS iphone应用程序中打开设置首选项时遇到问题。 目前我只是使用一个简单的按钮来测试,它似乎没有正常工作。

基本上,当我单击按钮时,我想要打开一个特定的设置首选项页面。 这是我目前在我的按钮IBACTION中使用的内容:

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

希望你们能帮助我解决这个问题,提前谢谢。

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.

最满意答案

试试这个:

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

应该在iOS 5中工作

......更新:

opening with the prefs url was disabled in iOS 5.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

更多推荐

本文发布于:2023-07-23 22:31:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1238176.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:首选   IOS   Opening   preferences   settings

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!