Using iOS 5 storyboards, on a button I am performing a segue, what I want is to do validation on my textfield and if validation is failed I have to stop segue and throw an a
I'll give you an example, here's my code:
- (IBAction)Authentificate:(id)sender {
if([self WSAuthentification]){
[self performSegueWithIdentifier:@"authentificationSegue" sender:sender];
}
else
{
UIAlertView *alert = [[UIAlertView alloc]initWithTitle:@"Authetification Failed" message:@"Please check your Identifications" delegate:self cancelButtonTitle:@"Dismiss" otherButtonTitles:nil, nil];
[alert show];
}
But it seems that's not working, in all cases my segue is performed. The answer is easy, we have to wire the segue from the view controller it self not from the Button.