I have a collectionview which has a UICollectionViewFlowLayout I put 10 items in it. and they have different sizes:
- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath {
if (indexPath.row<6) {
CGSize retval = CGSizeMake(100, 100);
return retval;
}
CGSize retval = CGSizeMake(200, 130);
return retval;
}
it layouts like: first 6 cells look good, and 7-9 are correct, but the last one is not center aligned,
any one could explain this to me?
and resent days Im playing with collection layouts, but still feel confused abt the selection of flowlayout and custom layout . any principles on this?
many thx in advance.