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.

detailed image here

i think solution change rootviewcontroller before loading view (2), , set second uinavigationcontroller main of application.

detailed image here

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

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

java - Digest auth with Spring Security using javaconfig -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -