我想在我的 iOS 应用程序中打开和关闭语音指示。 HERE 映射指令 (https://developer.here.com/mobile-sdks/documentation/ios-hybrid-plus/topics_api_nlp_hybrid_plus/protocolnmaaudiomanagerdelegate-p.html) 仍然在 Objective-C 中。在那种语言中如何做到这一点非常清楚,但我正在寻找 Swift 3 的等价物。那本手册说:
- @optional (BOOL) audioManager:( NMAAudioManager *) audioManager shouldPlayOutput:( NMAAudioOutput *) output
Called when the audio manager has output to play.
If the delegate returns YES, or the delegate does not implement this method, the output is played immediately. If the delegate returns NO, the delegate takes over responsiblity for handling the output.
我猜测与此类似,但我无法正确理解:
func audioManagerShouldPlayOutput(_ audioManager: NMAAudioManager!, shouldPlayOutput:false) {
}
最佳答案
这是使用 XCode "Generated Interface" assistant editor 创建的签名,希望对您有所帮助!看起来你只是有点离开了。
optional public func audioManager(_ audioManager: NMAAudioManager!, shouldPlay output: NMAAudioOutput!) -> Bool
关于ios - 此处 map iOS SDK 中的静音语音方向,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41815015/