Briahas
11/30/2016 - 10:38 AM

Blur

Blur

static const CGFloat borderInset = 50;
UIVisualEffectView *blurView = <#Your blur view#>;
 
CAShapeLayer *mask = [CAShapeLayer layer];
[mask setFillRule:kCAFillRuleEvenOdd];
   
CGRect borderFrame = CGRectMake(0, 0, CGRectGetWidth([blurView frame]), CGRectGetHeight([blurView frame]));
UIBezierPath *path = [UIBezierPath bezierPathWithRect:borderFrame];
[path appendPath:[UIBezierPath bezierPathWithRect:CGRectInset(borderFrame, borderInset, borderInset)]];
[path setUsesEvenOddFillRule:YES];
[mask setPath:[path CGPath]];
 
[[blurView layer] setMask:mask];