title: update UISlider progress bar currenttime and duration when audio plays
body: <p>Have a UISlider ProgressBar on UIToolbar when audio plays wants UISlider ProgressBar to display the duration of the audio file and currenttime of the audio file.</p>
  
  <pre><code> - (void)playAction:(id)sender
   {
  if([player isPlaying])
  {
      [sender setImage:[UIImage imageNamed:@"1play.png"] forState:UIControlStateSelected];
      [player pause];
      //[self pauseTimer];
  
  
  }else{
      [sender setImage:[UIImage imageNamed:@"audiopause.png"] forState:UIControlStateNormal];
      [player play];
      //[self resumeTimer];
  
  
      }
  
  [self updateProgressBar:timer];
  
  }
  
  
  - (void)updateProgressBar:(NSTimer *)timer
  {
  NSTimeInterval playTime = [self.player currentTime];
  NSTimeInterval duration = [self.player duration];
  float progress = playTime/duration;
  [_progressBar setProgress:progress];
  
  }
  </code></pre>
  
  <p>But it is not working.</p>
  
  <p>Thanks for help.</p>