The right column pictures get cut off. For example, the pink lion on the right should be basically symmetrical, but is obviously not. This is how I configure the imageCell.
func configureCellWithImage(image: Image){
let iV = self.imageView
iV.setImageWithURL(image.thumbURL)
if(image.aspectRatio < 1.62){
iV.contentMode = UIViewContentMode.ScaleAspectFit
}else{
iV.contentMode = UIViewContentMode.ScaleAspectFill
}
}
And this is how I return the size of the cell.
func collectionView(collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAtIndexPath indexPath: NSIndexPath) -> CGSize {
let size = CGSize.init(width: screenSize.width/2 - 1, height: screenSize.width/2 * 1.62 - 1)
return size
}
Help appreciated. Thank you.
EDIT:
I don't know why the UIView is there with the width of 201. It should be 159. How would I access this view? I should only have the CollectionView, imageCell and the UIImageView.