gpt4 book ai didi

ios - UIApplicationOpenSettingsURLString 在 iOS 10 中不起作用

转载 作者:行者123 更新时间:2023-12-02 05:12:37 27 4
gpt4 key购买 nike

iOS 10中,不要打开设置网址:

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString]];

问题是什么?

最佳答案

我确实喜欢这样,而且很有效。我今天测试一下!

 NSURL *url = [NSURL URLWithString:UIApplicationOpenSettingsURLString];
[[UIApplication sharedApplication] openURL:url];

swift 3:

let urlObj = NSURL.init(string:UIApplicationOpenSettingsURLString)
if #available(iOS 10.0, *) {
UIApplication.shared.open(urlObj as! URL, options: [ : ], completionHandler: { Success in

})
} else {
let success = UIApplication.shared.openURL(url as URL)
print("Open \(url): \(success)")
}

关于ios - UIApplicationOpenSettingsURLString 在 iOS 10 中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39595349/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com