In my app I have a login screen. When connecting a segue from the login button to the next (table) view controller however, you are always able to proceed, no matter what yo
On iOS 6, UIViewController's shouldPerformSegueWithIdentifier:sender:
method solves this issue without manual triggering segues.
This is belated, but imo it's best to setEnabled:NO whatever is triggering the segue until the segue is "valid". That separates your segue logic from your view logic....
You can wire up your login button or whatever to some IBAction code, decide if the login should proceed and then (if it should) you can use performSegueWithIdentifier:
to transition to the new view.
I just wrote another post about using this method, here.
- (IBAction)nextButtonPressed:(id)sender
{
if ([self hasAllRequiredFields]) {
[self performSegueWithIdentifier:@"showDashboard" sender:self];
}
}