How do I (successfully) set a maskView to a UIView?
问题 I'm making a camera-based app and would like to make a frosted overlay on the camera preview, with a rounded rectangle cut out from the frosted view. I've been trying to achieve this with the maskLayer of UIView, introduced with iOS 8 and have been wildly unsuccessful. Here's what my code currently looks like: // Blur the preview UIBlurEffect *effect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleLight]; UIView *blurView = [[UIVisualEffectView alloc] initWithEffect:effect]; blurView