I have an app that uses a navigation controller and want to have a preferences view. Typically when this view is brought up, the current view rotates as if the preferences is on the back of that view. I have made this work in a non-navigation controller based app, but am having troubles getting it to work in a navigation based app. I want the entire view including the Nav bar to rotate out. Here is what I'm doing. This code is in the a subclass of UIViewController
Any ideas?
Code:
PrefsViewController *prefsViewController = [[PrefsViewController alloc] initWithNibName:@"PrefsView" bundle:nil];
[UIView beginAnimations:@"View Flip" context:nil];
[UIView setAnimationDuration:1.25];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
UIViewController *coming = prefsViewController;
UIViewController *going = self.navigationController; // (I've also tried setting going = self
UIViewAnimationTransition transition= UIViewAnimationTransitionFlipFromLeft;
[UIView setAnimationTransition: transition forView:self.view cache:YES];
[coming viewWillAppear:YES];
[going viewWillDisappear:YES];
[going.view removeFromSuperview];
[self.view insertSubview: coming.view atIndex:0];
[going viewDidDisappear:YES];
[coming viewDidAppear:YES];
[UIView commitAnimations];
Any ideas?