Skip to content

Instantly share code, notes, and snippets.

@greenisus
Created September 30, 2011 18:37
Show Gist options
  • Save greenisus/1254603 to your computer and use it in GitHub Desktop.
Save greenisus/1254603 to your computer and use it in GitHub Desktop.
nice and neat
- (IBAction)loginButtonPressed:(id)sender {
// this is obviously temporary until we decide on UI for this :)
self.navigationItem.title = @"Authenticating...";
RSAccount *account = [RSAccount blank];
account.provider = self.provider;
account.username = self.usernameTextField.text;
account.api_key = self.apiKeyTextField.text;
if ([account authenticate]) {
[self dismissModalViewControllerAnimated:YES];
} else {
[self alert:@"There was a problem logging in. Please check your username and API key."];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment