在打进电话中断后如何继续录制音频?现在,来电后我的记录停止了,但是我希望能够继续记录
func audioRecorderDidFinishRecording(_ recorder: AVAudioRecorder,
successfully flag: Bool) {
if flag {
recorder.stop()
isRecording = false
recordButton.setImage(#imageLiteral(resourceName: "RecButtonRecord"), for: .normal)
playButton.isEnabled = true
playButton.alpha = 1
titleRecordTextView.isHidden = false
sourceRecordTextView.isHidden = false
}
else {
}
}
答案 0 :(得分:0)
使用
recorder.pause()
要暂停 recording
,您必须选中
通过 AppDelegate 方法进行管理
func applicationWillEnterForeground(_ application: UIApplication) {
// Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
}
,您必须使用NotificationCenter
从此处恢复。