I am using the following code for a NSTimer:
NSTimer* timer = [NSTimer scheduledTimerWithTimeInterval:.1 target:self selector:@selector(moveRect) userInfo:nil repeats:YES];
and inside the moveRect function, I am using the following to stop the timer:
[timer invalidate]
Usually, it works fine..However once in a while I get an exception saying invalid argument…
Can anyone kindly tell me what I am missing here ? Thanks !
Edit: getting “EXEC_BAD_ACCESS” ..any help ?
Invalidate the timer and then call: