Ios UIAlertView-使两个输入字段都安全

Ios UIAlertView-使两个输入字段都安全,ios,objective-c,uialertview,Ios,Objective C,Uialertview,是否可以将UIAlertView的两种输入类型都作为密码类型? 我正在实施更改密码功能,不知道这是否可行 UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Change password" message:nil delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"Change password", nil]; alert.alertViewStyle = U

是否可以将
UIAlertView
的两种输入类型都作为密码类型?
我正在实施更改密码功能,不知道这是否可行

UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Change password" message:nil delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"Change password", nil];
alert.alertViewStyle = UIAlertViewStyleLoginAndPasswordInput;
[alert textFieldAtIndex:0].placeholder = @"New password";
[alert textFieldAtIndex:1].placeholder = @"Confirm password";
[alert show];
好了:

[alert textFieldAtIndex:0].secureTextEntry = YES;
[alert textFieldAtIndex:1].secureTextEntry = YES;

更正:)将在9分钟内按照StackOverflow接受您的答案。在不同的主题上,是否可以更改这些输入字段的框架?