In my UICollectionViewCell class I wrote this:
- (void)layoutSubviews {
[super layoutSubviews];
self.myImageView.layer.cornerRadius = CGRectGetHeight(self.myImageView.frame) / 2;
self.myImageView.layer.masksToBounds = YES;
}
But this does not work correctly in all cases, it appears like this: