Its possible add more TextFields to UIAlertViewStyleLoginAndPasswordInput?
How could i do?
Or there is other possibility?
Asked
Active
Viewed 861 times
0
vikingosegundo
- 52,040
- 14
- 137
- 178
Davidin073
- 991
- 4
- 12
- 25
1 Answers
-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.
Popeye
- 11,839
- 9
- 58
- 91
-
FYI – As I said before: altering UIAlertViews view hierarchy was explicitly forbidden. Now it will be impossible. http://stackoverflow.com/questions/18729220/uialertview-addsubview-in-ios7 – vikingosegundo Sep 14 '13 at 18:51
-
Fairplay (Needed to use more characters) – Popeye Sep 15 '13 at 10:10