title: iphone development: nstimer calling a function
body: <p>I have a void function which just have <code>NSLog(@"Call me");</code> in its body.</p>
  
  <p>I call it in my view in every ten seconds by using</p>
  
  <pre><code>NSTimer *timer = [NSTimer scheduledTimerWithTimeInterval:10 target:self selector:@selector(yourMethod) userInfo:nil repeats:YES];
  </code></pre>
  
  <p>But I want it to stop it after 5 iterations. However it goes to infinity. How can I do that?</p>