Just converted a project to ARC and am now getting a EXEC_BAD_ACCESS after I dismiss a UIActionsheet, it was previously working and I am unsure if this is even ARC related. Zombies is enabled but showing me nothing and I tried instuments and it also gave me nothing.
This is presented in a modal view controller, case 0, the quit button works fine but the other two give me the bad access error.
This is my first conversion to ARC, am I missing something here?
Action sheet Creation:
-(IBAction)quitPressed:(id)sender {
UIActionSheet *sheet = [[UIActionSheet alloc] initWithTitle:@"Quit This Game?" delegate:self cancelButtonTitle:@"Keep Playing" destructiveButtonTitle:@"Quit" otherButtonTitles:@"Quit and Reveal Answers",nil];
[sheet showInView:self.view];
}
Action sheet delegate:
-(void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex{
switch (buttonIndex) {
case 0: //quit
[self dismissViewControllerAnimated:NO completion:^{
[self.delegate quitGame];
}];
break;
case 1: //quit and reveal
NSLog(@"reveal");
break;
case 2: //cancel
NSLog(@"cancel");
break;
default:
break;
}
}