iphone - How is a navigation controller added to an existing view -
i have tableview , want add new viewcontroller when user selects item new view shows image , bar @ top allow user go tableview.
this navigation bar @ top present in both views. possible add button e.g. share , link own actions button?
thanks.
your tableview should live inside uiviewcontroller subclass inside of uinavigationcontroller. can structure set selecting "navigation-based" app in project creation wizard. or can create structure in code. in app delegate, create uinavigationcontroller, , set app's first viewcontroller root view controller. pushing , popping view controllers easy, call:
mydetailvc *vc = [[[mydetailvc alloc] initwithnibname:@"mydetailvc" bundle:nil] autorelease]; [self.navigationcontroller pushviewcontroller:vc animated:yes];
edit: so, clarify, don't "add navigation controllers existing views," "push , pop instances of view controllers on navigation controller's stack."
Comments
Post a Comment