2

I tried.

__block UIBackgroundTaskIdentifier task=0;
task=[application beginBackgroundTaskWithExpirationHandler:^{
    NSLog(@"Expiration handler called %f",[application backgroundTimeRemaining]);
    [application endBackgroundTask:task];
    task=UIBackgroundTaskInvalid;
}];

I want to display waveform when I record the audio.I have use the EZAudio class but it will crash when I press HOME button or Lock Screen. How can I run the app in background please help me.

sohil
  • 818
  • 2
  • 15
  • 38

1 Answers1

0

Just i have used EZAudioPlot change to EZAudioPlotGL. select EZAudioPlotGL view change only class name of view goto identity inspector and change it EZAudioPlot. after that

@property (nonatomic,weak) IBOutlet EZAudioPlotGL *audioPlot;

Change it

@property (nonatomic,weak) IBOutlet EZAudioPlot *audioPlot;

its work fine.

sohil
  • 818
  • 2
  • 15
  • 38