nashyo

macrumors 6502
Original poster
Oct 1, 2010
299
0
Bristol
Why is it that this code causes the IBAction (Round Rect Button) to execute

'dissmissModalViewControllerAnimated:YES'

even if the _currentContent.Answer1Validity is equal to string @"CORRECT!"

???

surely it should execute the segue, as I'm telling it to

Code:
- (IBAction)OK:(id)sender 
{
    if([_currentContent.Answer1Validity isEqualToString:@"CORRECT!"])
    {
        [self performSegueWithIdentifier:@"Correct" sender:self];
    } else {
        [self dismissModalViewControllerAnimated:YES];
    }
}

I ctrl dragged a segue from the button to a view controller and selected push. The segue identifier is 'Correct'.
 

nashyo

macrumors 6502
Original poster
Oct 1, 2010
299
0
Bristol
I've abandoned this approach

I just learned that I should be using protocols for what I'm doing. By far the most difficult concept for me to understand so far.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.