Nstimer not invalidating

Rated 4.76/5 based on 987 customer reviews

[_explosion invalidate]; [_explosion release]; //There is a whole 'nother debate on whether or not to retain a scheduled timer //but I am a stickler for ownership so remember to release this in dealloc _explosion =

I have a UIDate Picker to select the date to countdown to, but ever every time I try to do a countdown the seconds start at 54 seconds instead of adjusting to the actual time of the device.

Now keeping track of the timer is not required if you only invalidate it after it fires.

You could just take an extra parameter on the explosion method that would be the timer ...

Testing for exact equivalency assumes the timer fires "exactly" when you need it.

Due to hardware or software timer resolutions or other things happening on the system, that may not occur.

Leave a Reply