Out of bounds of UICollectionViewCell when using UICollectionViewFlowLayout

Has anyone been able to push out of bounds UICollectionViewCell

without clipping a cell to its borders? I have a vanilla collection view that uses UICollectionViewFlowLayout

(horizontal) and I would like to be able to draw the path outside UICollectionViewCell

without breaking any of the layout provided UICollectionViewFlowLayout

. Installing clipsToBounds

in NO

doesn't seem to do the trick.

+3


source to share


2 answers


I got it to work by setting the maskSoBounds property of the layer to NO. (You will need to add the QuartzCore structure and import it into the view controller ...)

If that doesn't work, try setting the maskSoBounds property to the contentSpace property.



Good luck!

+1


source


For me, using maskToBounds did the job



   override func awakeFromNib() {
    super.awakeFromNib()       
    self.layer.masksToBounds = false
   }

      

+1


source







All Articles