美文网首页
the behavior of the UICollection

the behavior of the UICollection

作者: 半江瑟瑟 | 来源:发表于2016-08-22 09:35 被阅读633次

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.**


The relevant UICollectionViewFlowLayout instance is <UICollectionViewFlowLayout: 0x7fabf9580f60>, and it is attached to <UICollectionView: 0x7fabf9875800; frame = (0 0; 320 125); clipsToBounds = YES; autoresize = RM+BM; gestureRecognizers = <NSArray: 0x7fabf9573f70>; layer = <CALayer: 0x7fabf95769d0>; contentOffset: {0, 0}; contentSize: {0, 125}> collection view layout: <UICollectionViewFlowLayout: 0x7fabf9580f60>.


Make a symbolic breakpoint at UICollectionViewFlowLayoutBreakForInvalidSizes to catch this in the debugger.

解决方法

  • (void)viewDidLoad {
    [super viewDidLoad];
    //UICollectionViewController的属性
    self.automaticallyAdjustsScrollViewInsets = NO;
    }

相关文章

网友评论

      本文标题:the behavior of the UICollection

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