Guest User

Untitled

a guest
Jan 16th, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. App Delegate (did finish launching)
  2.  
  3. self.welcomeViewController = [[APPWelcomeViewController alloc] init];
  4. self.homeViewController = [[APPHomeViewController alloc] initWithNibName:@"APPHomeViewController" bundle:nil];
  5.  
  6. self.navController = [[UINavigationController alloc] initWithRootViewController:self.welcomeViewController];
  7. self.navController.navigationBarHidden = YES;
  8.  
  9. self.window.rootViewController = self.navController;
  10.  
  11. // Push the homeViewController onto the navController
  12. [self.navController pushViewController:self.homeViewController animated:YES];
  13.  
  14. // Log the user out
  15. [User logOut];
  16.  
  17. // Then we need to remove the Settings Modal View Conrtoller
  18. [self.presentingViewController dismissModalViewControllerAnimated:YES];
  19.  
  20. // Then we need to take user back to welcomeViewController
  21. [self.navigationController pushViewController:welcomeViewController animated:YES];
  22.  
  23. // Take me back to the root navigation view controller (APPWelcomeViewController)
  24. [self.navigationController popToRootViewControllerAnimated:YES];
Add Comment
Please, Sign In to add comment