他们说:“当用户在运行 iOS 6.0 的 iPhone 4 和 iPad(第三代)上选择主菜单上的最后一个按钮时,应用程序就会崩溃。”
当然我测试过,但一切正常。下面的代码有错吗?
NSDictionary *soundSetting;
soundSetting = [NSDictionary dictionaryWithObjectsAndKeys:
[NSNumber numberWithFloat: 44100.0],AVSampleRateKey,
[NSNumber numberWithInt: kAudioFormatMPEG4AAC],AVFormatIDKey,
[NSNumber numberWithInt: 2],AVNumberOfChannelsKey,
[NSNumber numberWithInt: AVAudioQualityHigh],
AVEncoderAudioQualityKey,nil];
NSString *docDir = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask,YES)objectAtIndex: 0];
//Spades
soundFileURLSpades = [NSURL fileURLWithPath:[docDir
stringByAppendingString: @"soundSpades.caf"]];
self.audioRecorderSpades = [[AVAudioRecorder alloc]
initWithURL: soundFileURLSpades
settings: soundSetting
error: nil];