/Mobile/iPhone/StoffiRemote/StoffiRemote/LoginViewController.m
http://yet-another-music-application.googlecode.com/ · Objective C · 70 lines · 40 code · 14 blank · 16 comment · 2 complexity · f17f9cc892f57f65e1facfdc688377a0 MD5 · raw file
- //
- // LoginViewController.m
- // StoffiRemote
- //
- // Created by Fredrik Gadnell on 9/26/11.
- // Copyright 2011 __MyCompanyName__. All rights reserved.
- //
- #import "LoginViewController.h"
- #import "User.h"
- @implementation LoginViewController
- - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
- {
- self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
- if (self) {
- // Custom initialization
- }
- return self;
- }
- - (void)loginPressed {
- // Simulation
- // [[StoffiOAuthManager sharedManager] signInToStoffiWithDelegate:self];
- [self didLogin];
- NSLog(@"Logged in as local simulated user");
- }
- - (void)didLogin {
- [self dismissModalViewControllerAnimated:YES];
-
- [[User currentUser] pullConfiguration];
- }
- - (void)dealloc
- {
- [super dealloc];
- }
- - (void)didReceiveMemoryWarning
- {
- // Releases the view if it doesn't have a superview.
- [super didReceiveMemoryWarning];
-
- // Release any cached data, images, etc that aren't in use.
- }
- #pragma mark - View lifecycle
- - (void)viewDidLoad
- {
- [super viewDidLoad];
- // Do any additional setup after loading the view from its nib.
- }
- - (void)viewDidUnload
- {
- [super viewDidUnload];
- // Release any retained subviews of the main view.
- // e.g. self.myOutlet = nil;
- }
- - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
- {
- // Return YES for supported orientations
- return (interfaceOrientation == UIInterfaceOrientationPortrait);
- }
- @end