-2

I want to write some code in a method in iOS and that method should be called for every 1 sec. Can anyone help me to do this. Thanks in Advance.

  • 1
    This is very common question. no need to ask here. U can found this easyly by searching google or SO old question. http://stackoverflow.com/questions/5674375/calling-a-method-after-each-60-seconds-in-iphone http://stackoverflow.com/questions/446717/how-can-i-create-a-count-down-timer-for-cocos2d – CRDave Apr 01 '13 at 07:42

1 Answers1

3
[NSTimer scheduledTimerWithTimeInterval:1.0
    target:self
    selector:@selector(thisIsCalledEvery1Second:)
    userInfo:nil
    repeats:YES];

Read Apple docs for NSTimer

msk
  • 8,885
  • 6
  • 41
  • 72