iOS - 解决the behavior of the UICollectionViewFlowLayout is not defined
来源:互联网 发布:淘宝怎么取消开店认证 编辑:程序博客网 时间:2024/05/22 15:47
文/大L君(简书作者)
原文链接:http://www.jianshu.com/p/b7798ac5ad3d
著作权归作者所有,转载请联系作者获得授权,并标注“简书作者”。
原文链接:http://www.jianshu.com/p/b7798ac5ad3d
著作权归作者所有,转载请联系作者获得授权,并标注“简书作者”。
问题描述
- 前提 : 自定义UICollectionViewFlowLayout:包含若干个UIScroll
- 理想现象 : 正常相应
报错reason :
2016-04-12 19:17:59.919 weather[95267:1467874] the behavior of the UICollectionViewFlowLayout is not defined because:2016-04-12 19:17:59.920 weather[95267:1467874] the item height must be less than the height of the UICollectionView minus the section insets top and bottom values, minus the content insets top and bottom values.
解决方式 : 添加以下设置
self.automaticallyAdjustsScrollViewInsets = NO;
分析:
1.automaticallyAdjustsScrollViewInsets根据按所在界面的status bar,navigationbar,与tabbar的高度,自动调整scrollview的 inset,
2.设置为no,不让viewController调整,布局自定义
修改方法:
- (void)viewDidLoad{ self.automaticallyAdjustsScrollViewInsets = NO; [self.collectionView registerClass:[UICollectionViewCell class] forCellWithReuseIdentifier:ID];}
`
0 0
- iOS - 解决the behavior of the UICollectionViewFlowLayout is not defined
- 【iOS】The behavior of the UICollectionViewFlowLayout is not defined because:
- the behavior of the UICollectionViewFlowLayout is not defined because:
- 04 - the behavior of the UICollectionViewFlowLayout is not defined
- UIFlowLayout:the behavior of the UICollectionViewFlowLayout is not defined
- The behavior of the UICollectionViewFlowLayout is not defined because 解决办法!
- xcode7.3出现the behavior of the UICollectionViewFlowLayout is not defined警告
- 启动服务,解决 the BASEDIRenvironmentvariable is not defined correctly
- 解决The JAVA_HOME environment variable is not defined correctly
- 解决The JAVA_HOME environment variable is not defined correctly
- NameError: the name CVM is not defined
- NLS_LANG is not defined on the client
- 解决IDE下The TOMCAT_7_HOME environment variable is not defined correctly问题
- The CATALINA_HOME environment variable is not defined correctly
- The JAVA_HOME environment variable is not defined correctly
- The JRE_HOME OR JAVA_HOME environment variable is not defined correct
- The CATALINA_HOME environment variable is not defined correctly
- The JRE_HOME environment variable is not defined correctly
- CodeForces 596E
- windows下文件路径太深,无法删除解决办法
- asterisk目录结构
- 循环删除数组中的元素
- 深入理解黑客攻击-改变程序的返回地址
- iOS - 解决the behavior of the UICollectionViewFlowLayout is not defined
- 关于使用BufferedWriter时没有数据 写入问题,和换行问题
- 自定义一个ListView实现聊天界面
- apk打包签名
- 【poj】【费用限制最短路】ROADs
- HDU 1247 trie树 + 暴力查询
- android developer tiny share-20161028
- android customalized [i]
- 群问题记录