苹果真的搞砸了这个.我想使用带有新UIAlertViewStylePlainTextInput样式的UIAlertView并在其中有三个按钮.结果如下:
解决方法
这不是一个完整的解决方案,但它可能会让你开始.
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,25.0f)); txt.BackgroundColor = UIColor.White; theTextField.AddSubview (txt); view.AddSubview (theTextField); view.Show ();
我发现当您将文本视图添加为子视图时,AlertView会尝试智能化.但是如果你把一个通用的UIView放在一个容器中,它会给你一些更有用的东西.
我还验证了这是XCode中的一个问题.
这post可能会给你一些更多的想法.