首页 > 移动平台 > 详细

ios实现带有输入框的AlertView

时间:2015-07-17 20:33:19      阅读:140      评论:0      收藏:0      [点我收藏+]

1,实现一个alertView

1     UIAlertView *alertView = [[UIAlertView alloc]initWithTitle:@"" message:@"请输入Wi-Fi密码" delegate:self cancelButtonTitle:@"取消" otherButtonTitles:@"确定", nil];
2     alertView.alertViewStyle = UIAlertViewStyleSecureTextInput;
3     [alertView show];

2,实现代理方法

1 #pragma mark - UIAlertViewDelegate
2 - (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex{
3     UITextField *passwordText = [alertView textFieldAtIndex:0];
4 //    passwordText.
5     NSLog(@"%@",passwordText.text);
6     NSLog(@"buttonIndex:%d",buttonIndex);
7 }

 

ios实现带有输入框的AlertView

原文:http://www.cnblogs.com/maxmoo/p/4655344.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!