UICollectionView出现the behavior of the UICollectionViewFlowLayout is not defined because:
2015-01-28 21:55:17.790 Demo[636:9351] the behavior of the UICollectionViewFlowLayout is notdefined because:
2015-01-28 21:55:17.791 Demo[636:9351]the item height must be less than the height of the UICollectionView minus thesection insets top and bottom values.
错误原因:
UICollectionViewFlowLayout的itemSize的宽或者高设置的有问题!它的size必须在父容器的范围之内!
另外一种情况就是使用到了:
[cell.contentView.subviews makeObjectsPerformSelector:@selector(removeFromSuperview)];
然后再对Cell进行初始化, 也会出现这个问题..
解决方法:
注册Cell的重用可以解决
UICollectionView出现the behavior of the UICollectionViewFlowLayout is not defined because:的更多相关文章
- the behavior of the UICollectionViewFlowLayout is not defined because:
the behavior of the UICollectionViewFlowLayout is not defined because: the item height must be le ...
- iOS项目之报错笔记
问题一: linker command failed with exit code 1 (use -vto see invocation) 原因:导入了.m的头文件,导致同时有两个一样的.m文件在编译 ...
- iOS (封装)一句话调用系统的alertView和alertController
前言: 本文仅作参考存留,请用新版封装:iOS 更加优雅便捷的UIAlertView/UIAlertController封装使用 UIAlertController是iOS8.0之后出来的新方法,其将 ...
- 利用UICollectionViewFlowLayout的隐式动画实现UICollectionView的layout的动画调整(外加放大指定cell效果)
前几天在gitHub看到个不错的效果,就是DaiExpandCollectionView,效果如图: 所以赶紧下下来源码看看他怎么实现的,打开源码看了半天,发现他没写什么关于动画的代码啊... 经 ...
- IOS中UICollectionView和UICollectionViewController的用法
1.新建一个xib描述UICollectionViewCell(比如DealCell.xib),设置好resuse identifier(比如deal) 2.控制器继承UICollectionView ...
- 第四十六篇、UICollectionView广告轮播控件
这是利用人的视觉错觉来实现无限轮播,UICollectionView 有很好的重用机制,这只是部分核心代码,后期还要继续完善和代码重构. #import <UIKit/UIKit.h> # ...
- iOS中 UICollectionView UI_19
UICollectionView 是UITableView加强版 UITableView 和UICollectionView的设计思想: 1.布局: UITableView 的布局可以由UITable ...
- [OC] UIcollectionView 与 UIcollectionViewCell 的使用
UICollectionView @interface ViewController ()<UICollectionViewDelegate,UICollectionViewDataSou ...
- 使用UICollectionView
使用UICollectionView 使用UICollectionView的流程: 1. 设定一个UICollectionViewFlowLayout 2. 使用这个设定的UICollectionVi ...
随机推荐
- 【HDOJ】4737 A Bit Fun
水题.不过题目很有趣儿. #include <cstdio> #define MAXN 100005 int a[MAXN]; int main() { int t, n, m; int ...
- C++ primer读书笔记 chapter3 标准库类型
除第二章介绍的是C++的基本类型,本章将大致介绍一下C++定义的内容丰富的抽象数据库类型标准库.着重介绍一下sting.vector和bitset. 3.2标准库string类型 1.string类型 ...
- 从JavaScript的移位运算看数字在计算机内部的编码——补码
偶然看到一个JavaScript的题目: js中13>>2=? -13>>2=? 在浏览器中很容易测试出答案分别是 3 和 -4. 13>>2 = 3 很 ...
- HDOJ 2058 The sum problem
Problem Description Given a sequence 1,2,3,--N, your job is to calculate all the possible sub-sequen ...
- hdu 4681 最长公共子序列+枚举
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4681 #include<cstdio> #include<cstring> # ...
- Storm-1.0.1+ZooKeeper-3.4.8+Netty-4.1.3 HA集群安装
Storm-1.0.1+ZooKeeper-3.4.8+Netty-4.1.3 HA集群安装 下载Storm-1.0.1 http://mirrors.tuna.tsinghua.edu.cn/apa ...
- 无题II hdu 2236(二分枚举区间)
分析:只需要用二分找一个区间,然后不断枚举这个区间是否可以达到最大匹配,一直二分到答案为止. 代码: =============================================== ...
- DOM解析原理
用于处理XML文档的DOM元素属性 childNodes:返回当前元素所有子元素的数组: firstChild:返回当前元素的第一个下级子元素: lastChild:返回当前元素的最后一个子元素: n ...
- bootstrap 仿实例
bootstrap实现一个网页 html文件 <!DOCTYPE html> <html> <head lang="en"> <meta ...
- WinFrom玩转config配置文件
本文转载:http://www.dotblogs.com.tw/sam319/archive/2010/01/01/12753.aspx 有時候我們希望程式可以記下使用者的設定 下次開啟時可以繼 ...