ipad - 显示键盘 + iPad 时 UIPopoverView 变得扭曲

标签 ipad uipopovercontroller

我遇到了 UIPopoverViewController 的布局问题。目前我正在展示一个大小为 (350, 820) 的 PopOver。我有一个按钮,单击 UIAlertView 将显示其中的文本字段。同时还显示键盘。现在的问题是,只要键盘是我的 PopOver 就会扭曲。表示popover的向上箭头向右移动,popover的内容相互混合。

在这方面的任何帮助将不胜感激。

谢谢

最佳答案

我看到了同样的问题。虽然它并不理想,但我的解决方法是使弹出框更小,以便它可以容纳键盘而无需调整自身大小。

//Work around a bug that causes the popover frame and table cells to become
//corrupted when the keyboard is displayed and the popover resizes.
[self setContentSizeForViewInPopover:CGSizeMake(320, 588)];

如果您的弹出框内容对于这种方法来说太大,您可以将它放在一个较小的弹出框内的 UIScrollView 中。

另请参阅此解决方案:
SplitViewController's popover UI error when UISearchBar is in focus

关于ipad - 显示键盘 + iPad 时 UIPopoverView 变得扭曲,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3994919/

相关文章:

iphone - MonoTouch : UpPopoverController. DidDismiss 未触发

ios - 新 iOS 7 模拟器中的登录弹出错误无法验证用户凭据

ios - 停止向 Apple 发送推送通知以进行传递

iphone - iOS:无法识别 subview 上的手势

css - 如何在 iPad/iPhone 链接中实现悬停状态?

ipad - UIPopOver 和方向改变

ios - UISearchDisplayController 与 UIPopover 中的 UISearchBar 关闭键盘问题

html - ipad img 缩放 css 错误

ios - 确定哪个 segue 触发了 UIViewController

objective-c - 不想关闭 UIPopover