I want to accept password using an alert view. Following is the code I am using. But I am unable to figure out why does the keyboard pop out two times instead of once? Any ideas?
UIAlertView *passwordAlert = [[UIAlertView alloc]
initWithTitle:@"Enter Password" message:@""
delegate:self cancelButtonTitle:@"Cancel"
otherButtonTitles:@"Submit",nil];
[passwordAlert addTextFieldWithValue:@"" label:@"Password"];
UITextField *textfield = [passwordAlert textFieldAtIndex:0];
textfield.secureTextEntry = YES;
[passwordAlert setTag:10];
[passwordAlert show];