IPhone : Can't use segue more than once

on Sunday, February 22, 2015

I'm trying to see a different viewcontroller whenever my app gets a push notification. I tried to use



[self performSegueWithIdentifier:@"shootPicture" sender:self];


and



[self performSelectorOnMainThread:@selector(performSegueWithIdentifier:sender:) withObject:@"shootPicture" waitUntilDone:NO];


and



UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
UIViewController *BombaViewController = [storyboard instantiateViewControllerWithIdentifier:@"BombaViewController"];
[self presentViewController:BombaViewController animated:NO completion:NULL];


All af the above example works, but they work JUST ONCE! After the viewcontroller goes back to the main tabbed controller, it doesn't work anymore.


I've also used NSLog to make sure that the system can actually intercept the push notifications. Any suggestions?


0 comments:

Post a Comment