Actually I want to stop the timer of one view when I go on next view, so what can i do? That means when I open one view the timer is start , when I come to next view the timer is still running. Plz help me for that.
I have used this method[NSTimer scheduledTimerWithTimeInterval:(10) target : self selector:@selector(onTimer) userInfo : nil repeats : YES];
2009-05-22 13:41:03
That method returns the NSTimer. Store the timer in an ivar and invalidate it in -viewWillDisappear. You should also invalidate this timer whenever you set the timer (so in your setTimer: accessor), and you should invalidate before releasing the ivar in -dealloc.
Rob Napier
2009-05-22 14:10:24