4

Apple really screwed this one up. I want to use a UIAlertView with the new UIAlertViewStylePlainTextInput style and have three buttons in it. The result looks as follows:

enter image description here

Has somebody managed to build a workaround until Apple will have fixed this issue? Maybe reducing the button height somehow or increase the total height of the alert view?

Krumelur
  • 32,180
  • 27
  • 124
  • 263
  • 1
    possible duplicate of [How do you format more than two buttons inside an UIAlertView with the UIAlertStylePlainTextInput style?](http://stackoverflow.com/questions/9754777/how-do-you-format-more-than-two-buttons-inside-an-uialertview-with-the-uialertst) – lnafziger Apr 20 '12 at 22:11

1 Answers1

1

This is not a complete solution but it may get you started.

UIAlertView view = new UIAlertView ("Alert", "This is an alert\n\n\n", null, "Login", "One", "Two");

UIView theTextField = new UIView (new RectangleF (12.0f, 80.0f, 260.0f, 25.0f));
UITextView txt = new UITextView (new RectangleF (0f, 0f, 260.0f, 25.0f));
txt.BackgroundColor = UIColor.White;
theTextField.AddSubview (txt);
view.AddSubview (theTextField); 

view.Show ();

I observed that the AlertView tries to be intelligent when you add a text view as a sub view. But if you put a generic UIView in as a container it gives you something more useable.

I also verified that this is a problem in XCode.

This post may give you some more ideas.

Community
  • 1
  • 1
holmes
  • 1,341
  • 9
  • 9