Switching Back Views
Hi all,
I have an toolbar app with a home, calendar, and contact info. section. On the calendar's section I have toolbar buttons to switch between months (July, August, September and so on). I am using this code to switch between the different views:
- (IBAction) switchToAugust{
augustMonthly *view3 = [[augustMonthly alloc] initWithNibName:nil bundle:nil];
[self presentModalViewController:view3 animated:NO];
}
This works fine for switching views (switching from July To August), but I need a way to get back to the main window toolbar like a "Done" button. I tried this:
- (IBAction) return {
[self.parentViewController dismissModalViewControllerAnimated:YES];
}
Which does indeed go back, but it goes back to the previous view so if I go to August, then press back it will take me to July then August and it never ends. How do I return to the tab bar main window using similar code? When I try the code I first listed with the CalendarViewController.h instead of augustMonthly.h, it simply takes me to a white screen! Thanks for any help
Happy 4th of July!
|