如何获取iOS画外音的选中元素
How to get the selected element of the iOS Voiceover
我有一个 iOS Swift 应用程序,我想检测画外音选择了哪个元素。
已尝试发送 UIAccessibilitySwitchControlStatusDidChangeNotification,但我无法正常工作。
NSNotificationCenter.defaultCenter().addObserver(
self,
selector: "handleVoiceoverSelection",
name: UIAccessibilitySwitchControlStatusDidChangeNotification,
object: nil)
...
func handleVoiceoverSelection(){
println("!!!! element selected !!!!")
}
有什么办法吗?
我有一个 iOS Swift 应用程序,我想检测画外音选择了哪个元素。
已尝试发送 UIAccessibilitySwitchControlStatusDidChangeNotification,但我无法正常工作。
NSNotificationCenter.defaultCenter().addObserver(
self,
selector: "handleVoiceoverSelection",
name: UIAccessibilitySwitchControlStatusDidChangeNotification,
object: nil)
...
func handleVoiceoverSelection(){
println("!!!! element selected !!!!")
}
有什么办法吗?