为什么下面的代码无法在iPhone 6s Plus中使用iOS9.2.1打开“设置”,但可以在iPhone 6s中打开。iPhone 6s Plus无法打开设置
NSURL *url = [NSURL URLWithString:@"prefs:root=WIFI"];
if ([[UIApplication sharedApplication] canOpenURL:url]) {
[[UIApplication sharedApplication] openURL:url];
}
如果没有,您可以尝试在主队列中调用它。 – Lumialxk
您是否在Info.plist中将“prefs”指定为“LSApplicationQueriesSchemes”? –
非常感谢。我在info.plist的'URL Types' - >'URL Schemes'框中添加'prefs'。 – Jone