zoukankan      html  css  js  c++  java
  • 刷新CollectionView 报错the item height must be less that the height of the UICollectionView minus the s

    数据请求到了之后 刷新CollectionView 出现下面的错误。

    the behavior of the UICollectionViewFlowLayout is not defined because:

    2015-03-16 10:56:45.898 XXXXX [664:60b] the item height must be less that the height of the UICollectionView minus the section insets top and bottom values.


    有可能是数据在插入之前,页面还没有加载完,导致的错误。

    网上找了好久,只要假如一句话就解决问题了:

     self.automaticallyAdjustsScrollViewInsets = NO;  

    automaticallyAdjustsScrollViewInsets

    为YES时,它会找view里的scrollView,并设置scrollView的contentInset为{64, 0, 0, 0}。如果你不想让scrollView的内容自动调整,将这个属性设为NO(默认值YES)。

     

  • 相关阅读:
    django学习笔记1
    排序多重排序
    06计算列
    填充日期序列
    行,列单元格
    读取excel文件
    监控文本
    天干地支纪年法
    Mysql基础
    JDBC基础
  • 原文地址:https://www.cnblogs.com/songlei0601/p/5874151.html
Copyright © 2011-2022 走看看