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
Post a Comment