在此处将语音方向静音映射iOS SDK [英] Mute Voice Directions in Here Maps iOS SDK
问题描述
我想在我的iOS应用程序中在打开和关闭之间切换语音提示. HERE映射说明( https://developer.here.com/mobile-sdks/documentation/ios-hybrid-plus/topics_api_nlp_hybrid_plus/protocolnmaaudiomanagerdelegate-p.html )仍然在目标C中.用这种语言很清楚如何做到这一点,但是我正在寻找等效的Swift 3.那本手册说:
I want to toggle the voice directions in my iOS app between on and off. The HERE maps instructions (https://developer.here.com/mobile-sdks/documentation/ios-hybrid-plus/topics_api_nlp_hybrid_plus/protocolnmaaudiomanagerdelegate-p.html) are still all in objective-C. It is quite clear in that language how to do this, but I am looking for the Swift 3 equivalent. That manual says:
- @可选的(BOOL)audioManager :( NMAAudioManager *)audioManager shouldPlayOutput :( NMAAudioOutput *)输出
- @optional (BOOL) audioManager:( NMAAudioManager *) audioManager shouldPlayOutput:( NMAAudioOutput *) output
在音频管理器有要播放的输出时调用.
Called when the audio manager has output to play.
如果委托返回YES,或者委托未实现 方法,将立即播放输出.如果委托返回否, 委托人负责处理输出.
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.
我猜类似的东西,但我做对了:
I am guessing something similar to this, but I can't get it right:
func audioManagerShouldPlayOutput(_ audioManager: NMAAudioManager!, shouldPlayOutput:false) {
}
推荐答案
这是使用XCode ,希望对您有所帮助!看起来您有点不舒服.
This is the signature created using the XCode "Generated Interface" assistant editor, hopefully it is helpful! Looks like you are off just a little bit.
optional public func audioManager(_ audioManager: NMAAudioManager!, shouldPlay output: NMAAudioOutput!) -> Bool
这篇关于在此处将语音方向静音映射iOS SDK的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!