您的位置:首页 > 产品设计 > UI/UE

UIAlertView 多个输入框的使用

2016-06-21 10:50 555 查看
转自:http://www.lxway.com/4421915526.htm;

UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"请输入口令" message:@"" delegate:self cancelButtonTitle:@"取消" otherButtonTitles:@"确定",nil];
[alert setAlertViewStyle:UIAlertViewStyleSecureTextInput];
[alert show];

其中,只需要设置AlertViewStyle风格即可显示出不同风格弹出框:

 UIAlertViewStylePlainTextInput添加一个普通输入框 
 UIAlertViewStyleSecureTextInput 密码输入框
 UIAlertViewStyleLoginAndPasswordInput 普通输入框加密码输入框
获得alertView中文本框的方法:

- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
{
UITextField *txt = [alertView textFieldAtIndex:0];

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: