I am facing an issue related to uicollectionview
.
I want to implement two section of collectionview with two different flow layout.
I am already having one section where showing list of items with a customflowlayout. Now I want to add one more section and want to add some different flowlayout for this.
Asked
Active
Viewed 829 times
1

Ashish Thakkar
- 944
- 8
- 27

user1210691
- 25
- 6
1 Answers
0
In your flowlayout delegate for collection view, you can try something like this-
-(CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath {
if(indexPath.section == 0){
}else{
}
}

Rikh
- 4,078
- 3
- 15
- 35
-
@LrLearn, this method will just return the CGSize but I want different custom flowlayout. http://stackoverflow.com/questions/27244051/can-we-set-different-flowlayout-in-different-sections-within-a-uicollectionview – user1210691 Jul 26 '16 at 15:09