Odd Segue Behaviour - Not Firing

Posted by Zak on Stack Overflow See other posts from Stack Overflow or by Zak
Published on 2012-06-27T21:09:05Z Indexed on 2012/06/27 21:15 UTC
Read the original article Hit count: 166

So I've noticed some very weird behaviour from my program. Here's a simplified code snippet and then I'll explain what occurs when built and ran.

-(void)viewDidLoad {
   [super viewDidLoad];
   ...
   if (self.sampleBool) {
       [self performSegueWithIdentifier:@"mySegue" sender:self];
   }
   else {
       // do stuff
   }
}
...
-(IBAction)myMethod:(UITapGestureRecognizer*)sender {
    ...
    [self performSegueWithIdentifier:@"mySegue" sender:self];
}

The segue triggers via the UITapGestureRecognizer fine - so I know the segue is linked correctly. However, when self.sampleBool is true and performSegueWithIdentifier is called within viewDidLoad, the segue does not fire.

Anyone have any guesses? Any help or advice is appreciated.

Thanks

© Stack Overflow or respective owner

Related posts about iphone

Related posts about ios