My situation is that I have a Primary View Controller (UIViewController
in PrimaryViewController.h .m
) that contains a UIButton
. When pressed, a second View Controller (UINavigationController
) is displayed, the general idea is to press a "settings" button and for a navigation view to pop up and allow the user to amend their settings.
I have been able to do this, but I am not entirely confident with my method. Inside the Primary View Controller I have added a Navigation Controller and linked it as an outlet inside the Primary controller. Then when the button is pressed, the function, showSettings
is called:
- (IBAction)showSettings {
[self presentModalViewController:navigationViewController animated:YES];
}
Similarly a hideSettings is called to close. Whilst this does work, I'm not sure I've done this in the best or correct way. I did previously try to create the Navigation Controller in the MainWindow.xib
and link it with the App Delegate, however I ran into a problem where I needed to call/display this controller in the PrimaryViewController.m
implementation file and couldn't work out how to do this (i.e. how to perform [super addSubview:];
outside the App Delegate class).
I could use what I have now, but would like to know the alternate method to doing this, primarily because I am not happy with the transition animation for Modal View Controllers and would rather use a flip animation.
Thanks in advance!