ios - CollectionView -> changing flow based on if logged in -


i have app using story board, collectionviews , navigationcontroller setup. works fine, want add in login.

so if user logged in, want bypass default behavior of going login screen.

what best way change flow?

thanks! phil

put logic in viewdidappear method of navigation controller's root view controller determines whether show login view or not. present modally animation set no, , first thing user sees.

-(void)viewdidappear:(bool)animated {     [super viewdidappear:animated];     if (!self.loggedin) {         uiviewcontroller *login = [self.storyboard instantiateviewcontrollerwithidentifier:@"login"];         [self presentviewcontroller:login animated:no completion:nil];     } } 

Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -