How to check if audioplayer is paused while loading multiple viewcontrollers
<p>In <code>playpauseAction</code> Method execution it will play audio file as well as load multiple <code>viewcontrollers</code></p>

<pre><code>-(void)playpauseAction:(id)sender 
{

 if  

  ([audioPlayer isPlaying]){

 [sender setImage:[UIImage imageNamed:@"play.png"] forState:UIControlStateSelected];

      [audioPlayer pause];

  } else {

 [sender setImage:[UIImage imageNamed:@"pause.png"] forState:UIControlStateNormal];

      [audioPlayer play];

      self.timer = [NSTimer scheduledTimerWithTimeInterval:11 target:self selector:@selector(displayviewsAction:) userInfo:nil repeats:NO];
  }  

}
</code></pre>

<p>While loading these <code>view controllers</code> just want to check in every <code>viewcontroller</code> that if <code>audioplayer</code> is paused then <code>invalidate timer</code> if not then continue loading of <code>viewcontroller</code> with <code>NSTimer</code></p>

<pre><code>- (void)displayviewsAction:(id)sender
{

FirstViewController *viewController = [[FirstViewController alloc] init];

viewController.view.frame = CGRectMake(0, 0, 320, 480);

[self.view addSubview:viewController.view];

[self.view addSubview:toolbar];

if  

    ([audioPlayer pause]){

    [timer invalidate];

    } else {

   self.timer = [NSTimer scheduledTimerWithTimeInterval:23 target:self selector:@selector(secondViewController) userInfo:nil repeats:NO];  

}  
[viewController release];
}
</code></pre>

<p>My problem is when i add if statement in <code>displayviewAction</code> method it gives me red warning message that <code>statement requires expression of scalar type (void invalid)</code>.</p>

<p>But <code>if statement</code>  in the  <code>playpauseAction</code> works fine.</p>

<p>Why the <code>if statement</code> of <code>displayviewAction</code> is giving red warning message.</p>
