Mute Voice Directions in Here Maps iOS SDK

牧云@^-^@ 提交于 2019-12-24 06:35:54

问题


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:

  • @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.

I am guessing something similar to this, but I can't get it right:

func audioManagerShouldPlayOutput(_ audioManager: NMAAudioManager!, shouldPlayOutput:false) {
    }

回答1:


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


来源:https://stackoverflow.com/questions/41815015/mute-voice-directions-in-here-maps-ios-sdk

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!