I'm trying to cut a hole inside UICollectionView. It works - but for some reason it cut's the UICollectionViewbehind the contentcells. I'm trying to cut it including the contentcells.
Sample :
Code:
class tCollection : UICollectionView
{
override func drawRect(rect: CGRect) {
super.drawRect(rect)
let holeRect = CGRectMake(20, 20, 50, 60)
var context: CGContextRef = UIGraphicsGetCurrentContext()!
CGContextSetFillColorWithColor(context, UIColor.blackColor().colorWithAlphaComponent(0.5).CGColor)
CGContextFillRect(context, rect)
var holeRectIntersection: CGRect = CGRectIntersection(holeRect, rect)
CGContextSetFillColorWithColor(context, UIColor.clearColor().CGColor)
CGContextSetBlendMode(context, CGBlendMode.Clear)
CGContextFillEllipseInRect(context, holeRect)
}
}
Any suggestion how to cut a hole completeley(including the cells/subviews etc')

