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? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -