美文网首页
UICollectionViewFlowLayout BUG!!

UICollectionViewFlowLayout BUG!!

作者: 我是卖报滴小行家 | 来源:发表于2017-07-07 11:40 被阅读41次

报错:
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!!

      本文链接:https://www.haomeiwen.com/subject/ieylhxtx.html