Enhancement navigation controller of app
Hello guys as i saw was not created a navigation controller for "entire app", just after make login and here is the problem. When we started navigation with login we should validate probably at request if user is still authorized for be connected, but if this change? We need log-out to log-in screen, but like is today we already deallocated login screen and changed hierarchy we need handle with this. For me i see two ways: 1 - We change navigation controller from first "logged screen" to login, and at our main class we create "state handle" that will manage stack of navigation controller, so we easy add, delete, insert new view controller to stack. 2 - Left like is today but we start at main view that today is "view controller" validating asynchronous if is logged or any other way, and if not we show login screen using modal type.
Its easy to created that i could create just need to know witch is better way or if already thought any other way.
I think going as is today is the best, but as you said, the root UIViewController should be the "chat" view controller and the validation if user is authenticated or not can be made on viewDidLoad, right?
Using just one UINavigationController is not work (IMHO) because of the transitions (modal, for example).
I agree with rafaelks. I think it's better to keep it the way it is now and we 'll just add a check on ViewDidLoad. I can make the initial controller the "chat" view controller and if the user is logged in he/she goes on from there. If not he/she 'll be redirected to login screen. Sound's OK?