I'm writing an iPhone app and I start with a main view and when I click a button it switches to my second view using this code...
- (IBAction)addNewCourse
{
AddCourses *addCourseController = [[AddCourses alloc] initWithNibName:@"AddCourses" bundle:nil];
[self presentModalViewController:addCourseController animated:YES];
}
Now I am having problems switching BACK to the original view. I use this code...
- (IBAction) back
{
[self.parentViewController dismissViewControllerAnimated:YES completion:nil];
}
but it doesn't seem to work. Any help would be greatly appreciated. Thanks