ios - How to manually set which storyboard view to show in app delegate -


i have app wants log out user whenever application inactive set period of time. it's multiple different views in app, , want app delegate set loginview current view whenever method fires:

- (void)applicationdidbecomeactive:(uiapplication *)application 

how manually set loginviewcontroller current showing view in storyboard in method?

uistoryboard *mainstoryboard = [uistoryboard storyboardwithname:@"mainstoryboard"                                                              bundle: nil]; loginviewcontroller *loginviewcontroller = [mainstoryboard instantiateviewcontrollerwithidentifier:@"loginviewcontroller"]; [_window setrootviewcontroller:loginviewcontroller]; 

Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

keyboard - C++ GetAsyncKeyState alternative -

android - java.net.UnknownHostException(Unable to resolve host “URL”: No address associated with hostname) -