Skip to content

Instantly share code, notes, and snippets.

@pratikshabhisikar
Created August 12, 2011 12:05
Show Gist options
  • Save pratikshabhisikar/1141920 to your computer and use it in GitHub Desktop.
Save pratikshabhisikar/1141920 to your computer and use it in GitHub Desktop.
Checking if user already exists
if (indexPath.row == 4) {
NSString *username = [[NSUserDefaults standardUserDefaults] objectForKey:@"username"];
NSString *password = [[NSUserDefaults standardUserDefaults] objectForKey:@"password"];
if (username && password) {
// User already exists. Go Directly to ever note view controller.
}else {
// User has not logged in. Go to ever note login view controller.
Evernotelogin *evernoteView = [[Evernotelogin alloc] initWithNibName:@"Evernotelogin"
bundle:nil];
[self.navigationController pushViewController:evernoteView animated:YES];
[evernoteView release];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment