ios - Multiple Navigation Controllers -


i having trouble organizing registration/login flow of app. have storyboard entry point of app pointing navigation controller. in appdelegate.m if user not logged in have:

    signupviewcontroller *signupviewcontroller = [[signupviewcontroller alloc] init];     self.navcontroller = [[uinavigationcontroller alloc] initwithrootviewcontroller:signupviewcontroller];     self.window.rootviewcontroller = self.navcontroller;     [self.window makekeyandvisible]; 

this creates 'sign up' navigation controller.

i have tried pop signupviewcontroller along navigation controller initial screen of app (the navigation controller pointed in storyboard), have not had success.

when use storyboards (and therefore have initial view controller there) ios doing set window.rootviewcontroller view controller initial view controller flag.

in code replacing root view controller signupviewcontroller embedded in uinavigationcontroller , that's why cannot pop because there no other view controller on stack.

one solution add logic on first view controller identifies if user logged in , in case not push (or present modally if will) signupviewcontroller. hope helps.


Comments

Popular posts from this blog

android - Why am I getting the message 'Youractivity.java is not an activity subclass or alias' -

Making Empty C++ Project: General exception (Exception from HRESULT:0x80131500) Visual Studio Community 2015 -

How to fix java warning for "The value of the local variable is not used " -