最近我在 UIAlertView
中使用了 UITextFied
来提示用户输入密码。但是在呈现 UIAlertView
后,我发现键盘被某些层重叠/覆盖,我无法通过键盘输入任何内容。
你能告诉我如何解决这个问题吗?非常感谢。
![UIAlertView 的屏幕截图][1]
最佳答案
请不要子类化或弄乱 UIAlertView 内的元素。 Apple's documentation says this:
Subclassing Notes
The UIAlertView class is intended to be used as-is and does not support subclassing. The view hierarchy for this class is private and must not be modified.
您需要创建自己的 UIView(带有文本字段和按钮),您可以将其作为 subview 添加到当前可见 View 中的任何其他内容之上。
关于ios - 无法在 UIAlertView 中使用键盘输入,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14288978/