gpt4 book ai didi

ios - 无法在 UIAlertView 中使用键盘输入

转载 作者:行者123 更新时间:2023-11-29 04:11:52 25 4
gpt4 key购买 nike

最近我在 UIAlertView 中使用了 UITextFied 来提示用户输入密码。但是在呈现 UIAlertView 后,我发现键盘被某些层重叠/覆盖,我无法通过键盘输入任何内容。

你能告诉我如何解决这个问题吗?非常感谢。

![UIAlertView 的屏幕截图][1]

http://i.stack.imgur.com/CMvMz.png

最佳答案

请不要子类化或弄乱 UIAlertView 内的元素。 Apple's documentation says this:

Subclassing Notes

The UIAlertView class is intended to be used as-isand does not support subclassing. The view hierarchy for this class isprivate and must not be modified.

您需要创建自己的 UIView(带有文本字段和按钮),您可以将其作为 subview 添加到当前可见 View 中的任何其他内容之上。

关于ios - 无法在 UIAlertView 中使用键盘输入,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14288978/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com