I'm having a bit of trouble wrapping my head around using a UINavigationController (with Interface Builder) when it isn't at the root of the application. I've found many examples which demo how to use one of these controllers when it is at the root of the application (in MainWindow.xib); however, my app is no开发者_如何学Ct structured this way. I have a UIScrollView which is my main display. From the scroll view screens I have a "settings" button. When that button is pressed I want the next view controller shown to be a screen which has a UINavigationController. This screen is your typical "settings" screen with a grouped table. Once a cell is tapped the nav controller will push another controller on to the stack which contains the relevant settings options.
My main problem is understanding how to implement the UINavigationController in this scenario. If anyone has any examples or advice it would be greatly appreciated.
Please do not simply point me to Apple documentation on View controllers or Navigation controllers. I have already read these documents and i'm still not getting it. I need some real help and advice.
Well, you need to re-read those documents, specifically the documentation on UINavigationController
.
The point that you miss is that you do not implement a UINavigationController
. You use that class and push your own viewcontroller on it.
You also seem to confuse a UINavigationController
for a UITableViewController. The two are completely different. Your settings would be implemented as a
UITableViewControllersubclass and pushed on a the
UINavigationController`.
精彩评论