-(void)audio Player Did Finish Playing:(AVAudio Player *)player successfully:(BOOL)flag The delegate method is getting called but the timer is not stopping.... I have only once thread on which i am runing the timer. The timer start alert only happens once and the timer stop alert only happens once but the timer continues to run.
I have this problem for a few days now and I don't get what I am doing wrong. @Cristik If timer Did End is executed I print out a line so I know it did end. The problem isn't the creation of the timer or that stop Timer() isn't used or whatever. My application is basically just creating some timers. If I use stop Alarm() on the same thread after that the line will be printed out anyway. I also dont think its possible to create multiple timers in this case because I always use the same variable so it would be overwritten, right? You must send this message from the thread on which the timer was installed.If you send this message from another thread, the input source associated with the timer may not be removed from its run loop, which could prevent the thread from exiting properly. But, the update Slider For Audio is being called continuously even after the timer is invalidated....
But my timer doesn't want to stop when I call the invalidate.
One last complication is that Win Forms, for example, may interfere with your attempts by catching exceptions before they reach the application's global exception handler.
Contrary to what some others have posted, there's nothing wrong catching all exceptions.
You can probably recall quite easily one of your cases.
As you can see, passing such a simple information through half of the VIPER structure may be one of the reasons to start looking for an alternative.
I have set a NSTimer and have tried invalidating it but the timer still triggers the selector.