I got a push segue connected in storyboards and then I'm using the prepareForSegue
method like this:
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
if ([[segue identifier] isEqualToString:@"start"] && self.name.textField.text == nil)
{
UIAlertView *message = [[UIAlertView alloc] initWithTitle:@"Test"
message:@"Test
delegate:self
cancelButtonTitle:@"OK"
otherButtonTitles:nil];
[message show];
}
}
What I want to do is that if the "if" is true, there pops an alert box and preforms the segue, but I just want to show the alert box, and I don't want to preform the segue. How can I solve this?