Skip to content

Instantly share code, notes, and snippets.

@dinjas
Created December 8, 2012 05:10
Show Gist options
  • Save dinjas/4238741 to your computer and use it in GitHub Desktop.
Save dinjas/4238741 to your computer and use it in GitHub Desktop.
- (IBAction)startThePlan:(id)sender {
ScheduleViewController *scheduleVC = [[ScheduleViewController alloc] initWithNibName:nil bundle:nil];
[self.navigationController pushViewController:scheduleVC animated:YES];
NSMutableArray *allViewControllers = [NSMutableArray arrayWithArray:self.navigationController.viewControllers];
int length = [allViewControllers count];
[allViewControllers objectAtIndex:length-1]; // remove confirmation view
[allViewControllers objectAtIndex:length-2]; // remove start date view
[allViewControllers objectAtIndex:length-3]; // remove plan selection view
self.navigationController.viewControllers = allViewControllers;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment