You can call the general selector, which, depending on the page displayed, calls other methods:
[NSTimer scheduledTimerWithTimeInterval:120
target:self
selector:@selector(selectorDispatcher)
userInfo:nil
repeats:YES];
and obviously your selectorDispatcher method will look something like this:
- (void) selectorDispatcher{
if(pageshown1)
[self callmethod1];
else
[self callmethod2];
}
I think this should work ... let me know!
source
share