Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath
- {
- CGSize innerSize = CGSizeMake(galleryView.frame.size.width - 80, galleryView.frame.size.height - 40);
- GLPhotoAsset *photo = [(PCOpticsPhotoPoint *)_cluster.points[indexPath.row] photo];
- CGFloat ratio = MIN(innerSize.width / photo.size.width, innerSize.height / photo.size.height);
- return CGSizeMake(photo.size.width * ratio, photo.size.height * ratio);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement