title: how can i perform selector after time without AfterDelay ?! (code unside)
body: <p>first of all thanks for getting into my questions.
  now, i tried a lot of different ways to call some function in my code but the ways i find it works (performselector:withobject:afterdelay) are get into the function immediately and i need the function to make some "if's" after random times.
  Well you can see the code in here-</p>
  
  <pre><code>-(void)playGame{
      isButtonPressed=NO;
  
      int minimum=1;
      int maximum=4;
      int randomTime=(arc4random()%(maximum-minimum))+minimum;
      [self performSelector:@selector(ifButtonNotPressed) withObject:nil afterDelay:randomTime];
  }
  
  -(void)closingAction{
      NSLog(@"Closing Panel automatic");
      if (randomFrog==1){
          [self performSelector:@selector(animatePanelCloseAction::) withObject:gameImage1_up withObject:gameImage1_down];
      }
      [self performSelector:@selector(playGame) withObject:nil afterDelay:0.25];
  }
  
  
  -(IBAction)buttonAction:(id)sender{
  
      if (sender == gameButton1 &amp;&amp; randomFrog==1){
          [self performSelector:@selector(disableAllButtons)];
          score=score+1;
          isButtonPressed=YES;
          [scoreLabel setText:[NSString stringWithFormat:@"Score:%d",score]]; 
          [self performSelector:@selector(closingAction)];
      }
  }
  
  -(void)ifButtonNotPressed{
      if (isButtonPressed==NO){
          [self performSelector:@selector(closingAction)];  
      }
  }
  </code></pre>
  
  <p>as you can see, im trying to check if button was pressed, but its going inside and check it immeditlly and perform it after delay.</p>
  
  <p>how can i call it after real delay ?!</p>
  
  <p>thank you all.
  amir. </p>