How to make Xcode execution to skip or jump statement when pause is pressed to resume
<p>I don't know how to code this but i want program to skip or jump this statement from executing</p>

<pre><code>self.timer = [NSTimer scheduledTimerWithTimeInterval:11.0
                                                  target:self
                                                selector:@selector(displayviewsAction:)
                                                userInfo:nil
                                                 repeats:NO];
</code></pre>

<p>when pause is pressed to resume play.</p>

<p>Reason i want this cause in play/pause button everything is good except when pause is pressed to resume it starts reloading view controllers by executing this statement from the below code</p>

<pre><code>self.timer = [NSTimer scheduledTimerWithTimeInterval:11.0
                                                  target:self
                                                selector:@selector(displayviewsAction:)
                                                userInfo:nil
                                                 repeats:NO];
</code></pre>

<p>I have tried so many different ways to solve this issues but nothing is working out.</p>

<pre><code> if([audioPlayer isPlaying]){
    [sender setImage:[UIImage imageNamed:@"Play Icon.png"] forState:UIControlStateSelected];
    [audioPlayer pause];
    [self pauseTimer];
}else {
    [sender setImage:[UIImage imageNamed:@"pause.png"] forState:UIControlStateNormal];
    [audioPlayer play];
    [self resumeTimer];
    self.timer = [NSTimer scheduledTimerWithTimeInterval:11.0
                                                  target:self
                                                selector:@selector(displayviewsAction:)
                                                userInfo:nil
                                                 repeats:NO];
</code></pre>

<p>That's how loading view controllers one after other</p>

<pre><code>- (void)displayviewsAction:(id)sender
 {  
  First *firstController = [[First alloc] init];
  firstController.view.frame = CGRectMake(0, 0, 320, 480);
  CATransition *transitionAnimation = [CATransition animation];   
  [transitionAnimation setDuration:1];
  [transitionAnimation setType:kCATransitionFade];
  [transitionAnimation setTimingFunction:[CAMediaTimingFunction       functionWithName:kCAMediaTimingFunctionEaseIn]];
  [self.view.layer addAnimation:transitionAnimation forKey:kCATransitionFade];
  [self.view addSubview:firstController.view];
  [self.view addSubview:toolbar];
  [firstController release];
  self.timer = [NSTimer scheduledTimerWithTimeInterval:23 target:self selector:@selector(Second) userInfo:nil repeats:NO];  
  }

  -(void)Second 
  {
   Second *secondController = [[Second alloc] init];
   secondController.view.frame = CGRectMake(0, 0, 320, 480);
   CATransition *transitionAnimation = [CATransition animation];
   [transitionAnimation setDuration:1];
   [transitionAnimation setType:kCATransitionReveal];
   [transitionAnimation setTimingFunction:[CAMediaTimingFunction     functionWithName:kCAMediaTimingFunctionEaseIn]];
   [self.view.layer addAnimation:transitionAnimation forKey:kCATransitionReveal];
   [self.view addSubview:secondController.view]; 
   [self.view addSubview:toolbar];
   [secondController release];
   self.timer = [NSTimer scheduledTimerWithTimeInterval:27 target:self selector:@selector(Third) userInfo:nil repeats:NO];
    }
</code></pre>

<p>This is my last attempt to see if i can find some solution for this issue. I have spent two weeks on this issue but no success.</p>

<p>If someone can solve my this issue.</p>

<p>Thanks so much for help.</p>
