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
I ctrl dragged a segue from the button to a view controller and selected push. The segue identifier is 'Correct'.
'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'.