I was just going though Hacking with Swifts (Paul Hudsons ) tutorials and found that this maybe a great addition to the code for the creation of the collection view cell.
cell.imageView.layer.borderColor = UIColor(red: 0, green: 0, blue: 0, alpha: 0.3).cgColor
cell.imageView.layer.borderWidth = 2
cell.imageView.layer.cornerRadius = 8
cell.imageView.clipsToBounds = true
cell.contentView.layer.borderColor = UIColor(red: 0, green: 0, blue: 0, alpha: 0.3).cgColor
cell.contentView.layer.borderWidth = 2
cell.layer.cornerRadius = 3
I found by using →
Allows you to alter the cell look.
Also the clips to bounds line makes the image look more schmick if the corners are altered and made rounder. It’ll make the image fit to what ever shape you create.
Have a good one and thanks for your great tutorials Paul.