UICollectionView 中的警告提示
2015-10-19 22:08
337 查看
通过xib创建的UICollectionViewCell,在xib中设置了cell size的宽和高,如果之后使用
flow.itemSize = CGSizeMake(cellWidth, cellHeight);动态修改了cell size,并且cell size的小于itemSize,会报一下错误,把xib的view尺寸拉大,并改变cell size的大小,就可以解决这个问题。
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.
2015-10-19 22:04:05.893 meibo[37852:467001] The relevant UICollectionViewFlowLayout instance is <UICollectionViewFlowLayout: 0x7ff2d042d7c0>, and it is attached to <UICollectionView: 0x7ff2d1091e00; frame = (0 0; 414 168.333); clipsToBounds = YES; autoresize = RM+BM; gestureRecognizers = <NSArray: 0x7ff2d06a9aa0>; layer = <CALayer: 0x7ff2d06a8690>; contentOffset: {0, 0}; contentSize: {0, 229}> collection view layout: <UICollectionViewFlowLayout: 0x7ff2d042d7c0>.
如果,默认高度229,如果itemSize大于229就会报警告
flow.itemSize = CGSizeMake(cellWidth, cellHeight);动态修改了cell size,并且cell size的小于itemSize,会报一下错误,把xib的view尺寸拉大,并改变cell size的大小,就可以解决这个问题。
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.
2015-10-19 22:04:05.893 meibo[37852:467001] The relevant UICollectionViewFlowLayout instance is <UICollectionViewFlowLayout: 0x7ff2d042d7c0>, and it is attached to <UICollectionView: 0x7ff2d1091e00; frame = (0 0; 414 168.333); clipsToBounds = YES; autoresize = RM+BM; gestureRecognizers = <NSArray: 0x7ff2d06a9aa0>; layer = <CALayer: 0x7ff2d06a8690>; contentOffset: {0, 0}; contentSize: {0, 229}> collection view layout: <UICollectionViewFlowLayout: 0x7ff2d042d7c0>.
如果,默认高度229,如果itemSize大于229就会报警告
相关文章推荐
- 【IOS 开发学习总结-OC-58】★UI控件——UITabBar 与UITabBarController
- 使用UIPickerView实现简单的城市选择器
- iOS:UIMapView地图视图控件的简单使用
- burpsuite猜解网站密码
- value vecter和 vector 的区别
- 最长公共子序列(Longest Common Subsequence)
- UILabel UIButton
- ural 1219. Symbolic Sequence
- iOS之UI随笔-视图控制器的生命周期
- 通过ida dump Uinity3D的加密dll
- JS模块化工具requirejs教程(二):基本知识
- UIControl及其子类
- ueditor使用经验
- iOS之UI基础---frame和bounds的区别
- iOS中 UITextView文本视图 技术分享
- iOS中 UITextView文本视图 技术分享
- iOS UIViewContentMode各类效果
- SyBaseのPowerBuilder12.5.1 打开dw时退出 解决方法
- UI23_基类
- Chapter5-标准I/O库(下)-「APUE读书笔记」