Hey guys, I've been racking my brain over this for the past hour and im just about out of ideas.
I have the following code as activated by a button on an ActionSheet.
I know this means that only the top button works, and that the other buttons do nothing but retract the sheet. My problem occurs with the following line:
I used some breakpoints and found that that line was causing my crash.
If you guys have any hunches please let me know.
Thank You.
PS, Anyone know any good resources for learning to use the debugger in Xcode?
I have the following code as activated by a button on an ActionSheet.
Code:
-(void) actionSheet:(UIActionSheet *)actionSheet willDismissWithButtonIndex:(NSInteger)buttonIndex {
if(buttonIndex != [actionSheet cancelButtonIndex]){
if (buttonIndex == ASSemesterButtonIndex) {
//SemesterAdd has been pressed. load the add semester modal view
SemesterAddViewController *addSemesterController = [[SemesterAddViewController alloc] initWithNibName:@"SemesterAddViewController" bundle:nil];
addSemesterController.delegate = self;
Semester *newSemester = [NSEntityDescription insertNewObjectForEntityForName:@"Semester" inManagedObjectContext:self.managedObjectContext];
addSemesterController.semester = newSemester;
UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:addSemesterController];
[self presentModalViewController:navigationController animated:YES];
[navigationController release];
[addSemesterController release];
}
}
}
I know this means that only the top button works, and that the other buttons do nothing but retract the sheet. My problem occurs with the following line:
Code:
[self presentModalViewController:navigationController animated:YES];
I used some breakpoints and found that that line was causing my crash.
If you guys have any hunches please let me know.
Thank You.
PS, Anyone know any good resources for learning to use the debugger in Xcode?