UIProgressView
AVAudioRecorder が録音している間、進行状況カウンターを増やすにはどうすればよいですか? インクリメントする場所がよくわかりませんprogressview
...
記録を開始および終了するコード:
- (IBAction)beginRecording:(id)sender {
if (player.playing) {
[player stop];
}
AVAudioSession *session = [AVAudioSession sharedInstance];
[session setActive:YES error:nil];
// Start recording
[recorder recordForDuration:8];
[_recordButton setTitle:@"Recording..." forState:UIControlStateNormal];
}
- (IBAction)endRecording:(id)sender {
// logic to stop recording
[recorder stop];
AVAudioSession *audioSession = [AVAudioSession sharedInstance];
[audioSession setActive:NO error:nil];
[_recordButton setTitle:@"Record" forState:UIControlStateNormal];
player = [[AVAudioPlayer alloc] initWithContentsOfURL:recorder.url error:nil];
[player setDelegate:self];
[player play];
}