我正在垂直收集视图内执行水平收集视图。它非常适合垂直集合视图。但是在水平简历中,第一个单元格的左侧有一些像图像一样的空间。我已将水平收集视图上的颜色更改为黄色。 UIEdgeInsetMake仅适用于顶部,底部和右侧,但不适用于左侧。即使我使用委托方法 insetforSectionAtIndex 也可以获得相同的结果。知道为什么它不起作用吗?
垂直简历单元仅包含一个集合视图。在第一个单元格中
- (void)layoutSubviews {
CGFloat itemHeight = [_innerCell intrinsicContentSize].height;
CGFloat itemWidth = (CGRectGetWidth([UIScreen mainScreen]).bounds));
_cvLayout = (id) _collectionView.collectionViewLayout;
_cvLayout.sectionInset = UIEdgeInsetMake(0,0);
_cvLayout.itemSize = CGSizeMake(itemWidth,itemHeight);
}