gpt4 book ai didi

ios - UICollectionView,导航栏覆盖了单元格

转载 作者:行者123 更新时间:2023-12-01 18:56:06 25 4
gpt4 key购买 nike

要删除collectionView单元格下面的空间:

UICollectionViewFlowLayout *flowLayout = [[UICollectionViewFlowLayout alloc] init];
[flowLayout setItemSize:CGSizeMake(300, 435)];
[flowLayout setMinimumInteritemSpacing:0.0f];
[flowLayout setMinimumLineSpacing:20.0f];
[flowLayout setSectionInset:UIEdgeInsetsMake(0, 10, 0, 10)];

[flowLayout setScrollDirection:UICollectionViewScrollDirectionHorizontal];

[self.collectionView setCollectionViewLayout:flowLayout];

最佳答案

尝试在-viewDidLoad中添加它:

if ([self respondsToSelector:@selector(edgesForExtendedLayout)])
self.edgesForExtendedLayout = UIRectEdgeNone;

关于ios - UICollectionView,导航栏覆盖了单元格,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27017767/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com