How can I remove a UIView with rounded corners from its parent view?
问题 I'm creating an iPad app for 3.2 and later. My app has an overlay view which has a semi-transparency that makes everything below it darker. In the middle of this view I am chopping a hole in this semi-transparency to let part of the background filter through unscathed, with this code: - (void)drawRect:(CGRect)rect { CGContextRef context = UIGraphicsGetCurrentContext(); CGRect intersection = CGRectIntersection(hole.frame, rect); CGContextClearRect(context, intersection); } Additionally, the