TheZipper TheZipper - 1 year ago 232
iOS Question

How to expand collectionview cell to full screen

I created a horizontal collection view and single cell is displayed in screen. I try to preview another views in each cell and when user swipe up the cell should expand to full screen.
I don't know to how to approach this problem? How can I expand cell to fullscreen animated?

Answer Source

If you want to increase cell size to fit to your screen you can use this method.

- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath
    return CGSizeMake(self.view.frame.size.width, self.view.frame.size.height);
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download