UIAlertViewStyleLoginAndPasswordInput with more TextFields?

点点圈 提交于 2019-12-12 04:59:05

问题


Its possible add more TextFields to UIAlertViewStyleLoginAndPasswordInput?
How could i do?
Or there is other possibility?


回答1:


Yes this is possible you can do it like this

 UIAlertView *myAlertView = [[UIAlertView alloc] initWithTitle:@"Your title here!" message:@"this gets covered" delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"OK", nil];
UITextField *myTextField = [[UITextField alloc] initWithFrame:CGRectMake(12.0, 45.0, 260.0, 25.0)];
[myTextField setBackgroundColor:[UIColor whiteColor]];
[myAlertView addSubview:myTextField];
[myAlertView show];
[myAlertView release];

Hope this helps.



来源:https://stackoverflow.com/questions/10916847/uialertviewstyleloginandpasswordinput-with-more-textfields

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!