Odd Segue Behaviour - Not Firing
- by Zak
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