在 Here Maps 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) 仍然全部在 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 应用程序中打开和关闭语音指示。 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