根据此链接https://stackoverflow.com/a/28152624/743663 你可以打开ACCESSIBILITY设置,但我可以通过URL设置(如ACCESSIBILITY-> Speech-Voice?)深入了解更多内容吗?
我的应用使用文字转语音,因此我希望用户转到语音设置,轻松下载增强型语音。
我想无法以编程方式下载增强型语音,所以我想至少轻松地显示设置屏幕。
这是打开可访问性的方法。
override func viewDidAppear(_ animated: Bool) {
let alertController = UIAlertController (title: "Title", message: "Go to Settings?", preferredStyle: .alert)
let settingsAction = UIAlertAction(title: "Settings", style: .default) { (_) -> Void in
guard let settingsUrl = URL(string: UIApplicationOpenSettingsURLString) else {
return
}
if UIApplication.shared.canOpenURL(settingsUrl) {
UIApplication.shared.open(settingsUrl, completionHandler: { (success) in
print("Settings opened: \(success)") // Prints true
})
}
}
alertController.addAction(settingsAction)
let cancelAction = UIAlertAction(title: "Cancel", style: .default, handler: nil)
alertController.addAction(cancelAction)
present(alertController, animated: true, completion: nil)
}
我试过" App-Prefs:root = General& path = ACCESSIBILITY& @ path = SPEECH",但它没有用。
答案 0 :(得分:0)
swift 5:ios 13
尝试:-App-prefs:root = General&path = ACCESSIBILITY / VOICEOVER / Speech
为我工作