Advertisement
Guest User

Untitled

a guest
Sep 22nd, 2016
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. UICKeyChainStore *keychain = [UICKeyChainStore keyChainStore];
  2. NSString *username = @"kishikawakatsumi@mac.com";
  3. NSString *password = keychain[username];
  4. if (password) {
  5. // If found password in the Keychain,
  6. // then go to second page
  7.  
  8. }
  9. else {
  10. // If not found password in the Keychain,
  11. // then go to initial login page
  12. UIStoryboard *mainStoryboard = [UIStoryboard storyboardWithName:@"Main" bundle: nil];
  13. InitialViewController *initialVC = (InitialViewController*)[mainStoryboard instantiateViewControllerWithIdentifier: @"InitialVC"];
  14. self.window.rootViewController = initialVC;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement