Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Drawing outside a UICollectionViewCell's bounds when using a UICollectionViewFlowLayout

Has anyone been able to draw outside the bounds of a UICollectionViewCell without the cell clipping to its bounds? I have a vanilla collection view that uses a UICollectionViewFlowLayout (horizontal) and I would like to be able to draw a path outside the bounds of the UICollectionViewCell without disrupting any of the layout provided by UICollectionViewFlowLayout. Setting clipsToBounds to NO does not seem to do the trick.

like image 710
Fourth Version Avatar asked Feb 19 '13 21:02

Fourth Version


1 Answers

I got it to work by setting the cell's layer's maskToBounds property to NO. (You'll need to bring in the QuartzCore framework and import it into the View Controller…)

If that doesn't work, try setting the cell's contentView's layer's maskToBounds property to NO.

Good luck!

like image 168
SushiGrass Jacob Avatar answered Jan 04 '23 00:01

SushiGrass Jacob