ios - Stacked UINavigationController -
i'm new in ios , i'm working storyboards.
i have application views.
my rootviewcontroller (1) uinavigationcontroller connects other views. @ 1 point in application (2), include component (swrevealviewcontroller, facebook side menu style) instance of uinavigationcontroller, have 2 uinavigationcontrollers nested within each other. want remove or change first uinavigationcontroller new 1 (2), , have one. views accessed via custom segues.
i think solution change rootviewcontroller before loading view (2), , set second uinavigationcontroller main of application.
i tried solve accessing by:
[uiapplication delegate].window.rootviewcontroller = mycontroller;
but have nil
or empty window.
i read many post solution in appdelegate in method
- (void) applicationdidfinishlaunching: (uiapplication *) application
can't understand how apply structure, because method called when application launched.
i think workflow application wrong.
any feedback or welcome! in advance.
it's fine change root view controller controller, code wrong. should be:
[uiapplication sharedapplication].delegate.window.rootviewcontroller = mycontroller;
if you're doing action controller view on screen, can way instead:
self.view.window.rootviewcontroller = mycontroller;
this should work long mycontroller has been instantiated.
Comments
Post a Comment