How do you record an audio in a view and getting the saved audio file after popping out in the parent view?
I am using embedded navigation controller in storyboard.
I have this code in my child view.
NSArray *dirPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *docsDir = [dirPaths objectAtIndex:0];
tempFilePath = [NSURL fileURLWithPath:[docsDir stringByAppendingPathComponent:[NSString stringWithFormat: @"record.%@", @"caf"]]];
NSMutableDictionary* recordSetting = [[NSMutableDictionary alloc] init];
[recordSetting setValue :[NSNumber numberWithInt:kAudioFormatAppleIMA4] forKey:AVFormatIDKey];
[recordSetting setValue:[NSNumber numberWithFloat:44100.0] forKey:AVSampleRateKey];
[recordSetting setValue:[NSNumber numberWithInt: 2] forKey:AVNumberOfChannelsKey];
audioRecorder = [[ AVAudioRecorder alloc] initWithURL:tempFilePath settings:recordSetting error:nil];
[audioRecorder setDelegate:self];
[audioRecorder prepareToRecord];
[audioRecorder record];
Now, how am I gonna get that in my parent controller?