【问题标题】:UIAlertView with UIAlertViewStylePlainTextInput warning in iOS9iOS9 中带有 UIAlertViewStylePlainTextInput 警告的 UIAlertView
【发布时间】:2015-10-08 10:11:49
【问题描述】:

我使用UIAlertView 样式UIAlertViewStylePlainTextInput,它可以工作,但在iOS9 上,但在显示更改后我得到以下日志:

UICollectionViewFlowLayout 的行为未定义,因为 项目高度必须小于UICollectionView 的高度减去部分插入顶部和底部值,再减去内容插入顶部和底部值。

相关的 UICollectionViewFlowLayout 实例是 <_uialertcontrollercollectionviewflowlayout:>,它是 附在 ; 层 = ;内容偏移:{0, 0};内容大小: {0, 0}> 集合视图布局: <_uialertcontrollercollectionviewflowlayout:>.

Make a symbolic breakpoint at UICollectionViewFlowLayoutBreakForInvalidSizes to catch this in the debugger.

相同的代码在 iOS8 上运行,没有任何警告。

【问题讨论】:

    标签: uialertview ios9


    【解决方案1】:

    我遇到了同样的问题。

    您是否尝试过像这样在您的 alertController 周围放置一个框架?

    alertController.view.frame = CGRectMake(0.0, 0.0, 320.0, 400.0); // Workaround iOS8.3 bug - set this to larger than you'll need
    

    【讨论】:

    • 它解决了你身边的问题还是只是想告诉你你也想有一个解决方案?
    • 在网上找到并玩了...但它并没有解决我的问题:-(
    猜你喜欢
    • 2014-09-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-11-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多