IAlertView * alert =
[[UIAlertView alloc] initWithTitle:@"Alert" message:@"This is an example alert!" delegate:self
cancelButtonTitle:@"Hide" otherButtonTitles:nil];alert.alertViewStyle = UIAlertViewStylePlainTextInput;
[alert show];
定义一个普通的提示框,关键alert.alertViewStyle =UIAlertViewStylePlainTextInput; 提示框就变成输入框。
怎么变成密码输入框呢,alert.alertViewStyle = UIAlertViewStyleSecureTextInput
我们平时用的text field 勾选secure选项也可以变成密码