我编写了代码以在我的 Apple Watch 上使用听写。我使用没有建议的 presentTextInputControllerWithSuggestions 直接开始听写。
但是,我有两个问题:
- 我想在我的应用程序启动时开始听写。为此,我在 willActivate 方法中调用我的函数,但是这样,我的屏幕上只出现了一个等待图像,而不是我的第一页听写。
- 我想在不按“完成”按钮的情况下停止听写。我不知道这是否可能,我怎样才能做到这一点。
有我的代码:
func dictation(){
self.presentTextInputControllerWithSuggestions([], allowedInputMode: WKTextInputMode.Plain, completion:{
(results) -> Void in
//myCode
})
}
override func willActivate(){
super.willActivate()
dictation()
}
你有解决方案吗?