I have a tab bar application with three tabs. In my second tab view i have a UIProgressView
. I have a NSTimer in my viewDidLoad
method which calls a method which updates the progressView
progressTimer = [NSTimer scheduledTimerWithTimeInterval:1.5 target:self selector:@selector(updateProgress) userInfo:nil repeats:YES];
All is fine so far.
I want to know how do i run the timer in the background throughout the lifecycle of the app, so that progressView
is updated no matter which view the user is in. It will be great if you can show me with a code snippet.
Thanks in advance.