chris antonopoulos chris antonopoulos - 10 months ago 30
Swift Question

How change collectionView size or layout?

I have UITableView cell and i had nested UICollectionView. How change the height of the UICollectionView ?


Use this code change the frame size according to your need

- (CGSize)collectionView:(UICollectionView *)collectionView
                  layout:(UICollectionViewLayout *)collectionViewLayout
  sizeForItemAtIndexPath:(NSIndexPath *)indexPath

    return CGSizeMake(collectionView.frame.size.width, collectionView.frame.size.height);

It works for me and i hope it works for you too :)