I have a viewcontroller with 2 CollectionView Controllers.
I would like on rotation that only one of the collection views resize to a custom size while the other remains the same.
I have tried to use:
- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath
{
// Adjust cell size for orientation
if (UIDeviceOrientationIsLandscape([[UIApplication sharedApplication] statusBarOrientation])) {
return CGSizeMake(170.f, 170.f);
}
return CGSizeMake(192.f, 192.f);
}
However that just changes both collectionviews. How do I get it to be specific to only one collection?