See UIAlertView.h
file
/* Retrieve a text field at an index - raises NSRangeException when textFieldIndex is out-of-bounds. The field at index 0 will be the first text field (the single field or the login field), the field at index 1 will be the password field. */
- (UITextField *)textFieldAtIndex:(NSInteger)textFieldIndex NS_AVAILABLE_IOS(5_0);
Do like this:
alert.alertViewStyle = UIAlertViewStyleLoginAndPasswordInput;
UITextField * name = [alert textFieldAtIndex:0];
name.keyboardType = UIKeyboardTypeAlphabet;
name.placeholder = @"Enter your name";
UITextField * phone = [alert textFieldAtIndex:1];
phone.secureTextEntry = NO;
phone.keyboardType = UIKeyboardTypeNumberPad;
phone.placeholder = @"Enter your phone";