【发布时间】:2016-01-25 03:30:45
【问题描述】:
我有一个集合视图,其中我有一个单元格。在故事板上单元格的高度等于集合视图的高度。但是当我运行它时它会显示底部空间。请告诉我如何删除它.我已经使用以下代码来删除它。
- (UIEdgeInsets)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout insetForSectionAtIndex:(NSInteger)section {
[self setAutomaticallyAdjustsScrollViewInsets:NO];
// return UIEdgeInsetsMake(0,8,0,8); // top, left, bottom, right
if (collectionView==self.album_collection_view)
{
return UIEdgeInsetsMake(0,10,0,10);
}// top, left, bottom, right
else
return UIEdgeInsetsMake(0,10,0,10);
}
请告诉如何删除它?
【问题讨论】:
-
你能把你设置
UICollectionViewLayout的代码贴出来吗?
标签: ios objective-c xcode uicollectionview