Created
November 6, 2011 21:36
-
-
Save Adam0101/1343535 to your computer and use it in GitHub Desktop.
UIAlertViewStyleLoginAndPassword
This file contains 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
- (void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex | |
{ | |
if (buttonIndex == 1) { | |
NSLog(@"Username:%@",[[alertView textFieldAtIndex:0] text]); | |
NSLog(@"Password:%@",[[alertView textFieldAtIndex:1] text]); | |
} | |
} | |
- (IBAction)ClickedMe:(id)sender { | |
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Click Me!" | |
message:@"Fill out the text field..." | |
delegate:self | |
cancelButtonTitle:@"Cancel" | |
otherButtonTitles:@"Ok", nil]; | |
alert.alertViewStyle = UIAlertViewStyleLoginAndPasswordInput; | |
[alert show]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment