PageRenderTime 22ms CodeModel.GetById 14ms app.highlight 7ms RepoModel.GetById 1ms app.codeStats 0ms

/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
 1//
 2//  LoginViewController.m
 3//  StoffiRemote
 4//
 5//  Created by Fredrik Gadnell on 9/26/11.
 6//  Copyright 2011 __MyCompanyName__. All rights reserved.
 7//
 8
 9#import "LoginViewController.h"
10#import "User.h"
11
12@implementation LoginViewController
13
14- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
15{
16    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
17    if (self) {
18        // Custom initialization
19    }
20    return self;
21}
22
23- (void)loginPressed {
24    // Simulation
25    // [[StoffiOAuthManager sharedManager] signInToStoffiWithDelegate:self];
26    [self didLogin];
27    NSLog(@"Logged in as local simulated user");
28}
29
30- (void)didLogin {
31    [self dismissModalViewControllerAnimated:YES];
32    
33    [[User currentUser] pullConfiguration];
34}
35
36- (void)dealloc
37{
38    [super dealloc];
39}
40
41- (void)didReceiveMemoryWarning
42{
43    // Releases the view if it doesn't have a superview.
44    [super didReceiveMemoryWarning];
45    
46    // Release any cached data, images, etc that aren't in use.
47}
48
49#pragma mark - View lifecycle
50
51- (void)viewDidLoad
52{
53    [super viewDidLoad];
54    // Do any additional setup after loading the view from its nib.
55}
56
57- (void)viewDidUnload
58{
59    [super viewDidUnload];
60    // Release any retained subviews of the main view.
61    // e.g. self.myOutlet = nil;
62}
63
64- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
65{
66    // Return YES for supported orientations
67    return (interfaceOrientation == UIInterfaceOrientationPortrait);
68}
69
70@end