Reputation: 894
im pretty new to the iOS thing and I think this should be easy to answer:
I have a Master-Detail-Application with many subviews which works fine and in the background I have several timers running. Now when a timer fires I want to switch to a single view from wherever the user is at the moment. (with a button to go back where he came from)
what is the best way to do this?
should I somehow get the current active viewcontroller and tell him to do the segue?
thanks!
Update:
for clarification: I have a non UI related (NSObject) Scheduler for all my timers which somehow has to notify my UI when a timer fires to popup a special View, which should overlay the current active view and show it again when dismissed.
a regular fullscreen popup.
Upvotes: 0
Views: 296
Reputation: 5745
If you're trying to do a segue when a timer fires, that's easy. Do
[NSTimer scheduledTimerWithTimeInterval:5.0 target:self selector:@selector(segue) userInfo:nil repeats:NO];
-(void)segue {
[self performSegueWithIdentifier:@"id" sender:self];
}
Upvotes: 1