Created
September 25, 2012 00:24
-
-
Save criccomini/3779273 to your computer and use it in GitHub Desktop.
Simple Login Screen - LoginViewController.m
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #import "LoginViewController.h" | |
| @implementation LoginViewController | |
| @synthesize usernameField; | |
| @synthesize passwordField; | |
| @synthesize loginButton; | |
| @synthesize loginIndicator; | |
| - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { | |
| // Return YES for supported orientations | |
| return (interfaceOrientation == UIInterfaceOrientationPortrait); | |
| } | |
| - (void)didReceiveMemoryWarning { | |
| [super didReceiveMemoryWarning]; // Releases the view if it doesn't have a superview | |
| // Release anything that's not essential, such as cached data | |
| } | |
| - (void)dealloc { | |
| [super dealloc]; | |
| } | |
| - (IBAction) login: (id) sender | |
| { | |
| // TODO: spawn a login thread | |
| loginIndicator.hidden = FALSE; | |
| [loginIndicator startAnimating]; | |
| loginButton.enabled = FALSE; | |
| } | |
| @end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment