title: NStimer and for loop
body: <p>I'm struggling with this. I saw some code where you can do this :</p>
  
  <pre><code>- (void)startTimer {
      pauseTimer = [NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(doActions) userInfo:nil repeats:YES];
  } 
  </code></pre>
  
  <p>Then call it in doActions.</p>
  
  <p>Problem is i want to call it while a button is being pressed, and do actions is an <code>IBaction</code>. I keep getting a <code>sigAbrt</code>.</p>
  
  <p>Can someone give me some sample code where you cay change a label from 'on' to 'off' every 1 second while a button is being pressed?</p>
  
  <p>EDIT</p>
  
  <p>i mean if doActions looks like this</p>
  
  <pre><code>- (IBAction) doActions {
  for(int j; j&lt;100; j++){
  
  theLabel.hidden != theLabel.hidden;
  //Does invalidate timer go here?
  }
  }
  </code></pre>