objective c - How to add UIView to UINavigationController stack -
i have uiview add subview uiviewcontrollers in uinavigationcontroller's stack, side menu, in facebook ios app. need add uiview navigationcontroller, can push new viewcontrollers onto stack. know how can this?
a navigation controller works stack can push , pop viewcontroller stack behaves in real world. think of navigation controller stack of viewcontrollers, cant add uiview, instead add uiview subview in view controller , push view controller onto navigation controller stack simple:
[navigationcontroller pushviewcontroller:aviewcontroller];
i suggest read docs can have better grasp of how navigationcontrollers work: http://developer.apple.com/library/ios/#documentation/uikit/reference/uinavigationcontroller_class/
-its important mention @ first need set navigation controller root view controller - first vc appear.
navigationcontroller.rootviewcontroller = aviewcontroller;
Comments
Post a Comment