【发布时间】:2015-06-10 17:00:43
【问题描述】:
我只是试图满足以下函数的参数以调出录音机。我相信问题出在完成块上。调试中给出的错误是:
presentAudioRecordingControllerWithOutputURL:preset:maximumDuration:actionTitle:completion: 需要非 NULL URL 和完成块
NSBundle* myBundle = [NSBundle mainBundle];
NSURL* recording = [myBundle URLForResource:@"recording" withExtension:@"mp4"];
[self presentAudioRecordingControllerWithOutputURL:recording
preset:WKAudioRecordingPresetWideBandSpeech
maximumDuration:5000
actionTitle:@"Recording"
completion:^(BOOL didSave, NSError *error) {
if (error != nil)
{
NSLog(@"Error: %@",error);
}
else if(didSave == YES)
{
NSLog(@"Saved the recording");
}
}];
【问题讨论】:
标签: objective-c recording