1.导框架
1.系统框架
CoreAudio.framework
AVFoundation.framework
2.导头文件
#import <AVFoundation/AVFoundation.h>
3.遵守协议
<AVAudioRecorderDelegate>
{
AVAudioRecorder *_recoder; //录音
}
2.录音
//record
//第一个参数:录音存放位置的字符串转化为的网址
NSString *path = NSHomeDirectory();
//用当前日期的字符串作为文件名
NSDate *date = [NSDate date];
NSDateFormatter *formatter = [[NSDateFormatter alloc]init];
formatter.dateFormat = @"yyyyMMddHHmmss";
NSString *dateStr = [formatter stringFromDate:date];
NSString<