04 - the behavior of the UICollectionViewFlowLayout is not defined
来源:互联网 发布:hr人力资源软件免费 编辑:程序博客网 时间:2024/05/01 22:34
问题描述
- 前提 : 自定义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];}
简书地址:http://www.jianshu.com/users/227bbeb09f91/latest_articles
`
0 0
- 04 - the behavior of the UICollectionViewFlowLayout is not defined
- the behavior of the UICollectionViewFlowLayout is not defined because:
- UIFlowLayout:the behavior of the UICollectionViewFlowLayout is not defined
- 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 解决办法!
- xcode7.3出现the behavior of the UICollectionViewFlowLayout is not defined警告
- NameError: the name CVM is not defined
- NLS_LANG is not defined on the client
- 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 BASEDIRenvironmentvariable is not defined correctly
- The CATALINA_HOME environment variable is not defined correctly
- The JRE_HOME environment variable is not defined correctly
- The CATALINA_HOME environment variable is not defined correctly问题解决
- JRE_HOME错误 The JAVA_HOME environment variable is not defined correctly
- the catalina_home environment variable is not defined correctly
- G
- oracle sql学习二
- mybatis 批量增加、删除、修改、查询
- UITableViewCell设置编辑功能
- 字符串的编辑距离
- 04 - the behavior of the UICollectionViewFlowLayout is not defined
- iOS8之后创建Action Extension应用扩展
- WebView使用过程中你该知道的二三事
- json的4个基本原则
- POJ-2960-S-Nim(SG函数)
- android6.0 fuse文件系统的挂载和卸载问题
- CSS布局奇淫技巧之-宽度自适应
- 详解Android动画之Frame Animation
- 计算几何