UICollectionViewFlowLayout BUG!!

报错:
The behavior of the UICollectionViewFlowLayout is not defined because:
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

出错原因应该是与NavigationBar的存在有关...

添加下列代码可解决:
self.edgesForExtendedLayout = UIRectEdgeNone;
或:
self.automaticallyAdjustsScrollViewInsets = YES;

你可能感兴趣的:(UICollectionViewFlowLayout BUG!!)