Does anyone know how to \"stop\" a segue transition conditionally:
My table view cells represent products which can be viewed in a drill-down \"detail\" view... or
In your - (void)prepareForSegue:(UIStoryboardSegue*)segue sender:(id)sender;
method, you could add some code such as:
if ([[segue identifier] isEqualToString:@"DemoSegue"] && !self.canOpenDemo) {
id *nc = [segue destinationViewController]; // UIViewController, UINavigationController, etc. (keeping "id" will return warning)
[nc dismissModalViewControllerAnimated:NO];
}
And this will stop the view from opening, however I have not checked, but it seems like it will have already called your destination view controllers initialize function (again, I haven't checked in Xcode, so I'm not entirely sure).