Advertisement
Guest User

Untitled

a guest
Jul 13th, 2014
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. - (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath
  2. {
  3. CGSize innerSize = CGSizeMake(galleryView.frame.size.width - 80, galleryView.frame.size.height - 40);
  4. GLPhotoAsset *photo = [(PCOpticsPhotoPoint *)_cluster.points[indexPath.row] photo];
  5. CGFloat ratio = MIN(innerSize.width / photo.size.width, innerSize.height / photo.size.height);
  6.  
  7. return CGSizeMake(photo.size.width * ratio, photo.size.height * ratio);
  8. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement