import UIKit protocol PinterestLayoutDelegate { func collectionView(_ collectionView:UICollectionView, heightForPhotoAtIndexPath indexPath:IndexPath , withWidth:CGFloat) -> CGFloat func collectionView(_ collectionView: UICollectionView, heightForCaptionAndCommentAtIndexPath indexPath: IndexPath, withWidth width: CGFloat) -> CGFloat } class PinterestLayoutAttributes: UICollectionViewLayoutAttribute