单元格数量少,cell被居中
2019-07-30 本文已影响0人
寒雨晚风
- (UIEdgeInsets)collectionView:(UICollectionView*)collectionView layout:(UICollectionViewLayout*)collectionViewLayout insetForSectionAtIndex:(NSInteger)section {
NSIntegerresult = 0;
result = [self.contentData[section][kHDClassifyLeftTableViewModelDataKeyChildNode] count];
if(result>1) {
return UIEdgeInsetsMake(0,0,0,0);
}
else
{
returnUIEdgeInsetsMake(0,0,0,(ScreenW-100)/2);
}
}