Although I would not recommend this if you are not ready to return to it without working in a future version, you can subclass NSVisualEffectView to do the following:
- (void)updateLayer { [super updateLayer]; [CATransaction begin]; [CATransaction setDisableActions:YES]; CALayer *backdropLayer = self.layer.sublayers.firstObject; if ([backdropLayer.name hasPrefix:@"kCUIVariantMac"]) { for (CALayer *activeLayer in backdropLayer.sublayers) { if ([activeLayer.name isEqualToString:@"Active"]) { for (CALayer *sublayer in activeLayer.sublayers) { if ([sublayer.name isEqualToString:@"Backdrop"]) { for (id filter in sublayer.filters) { if ([filter respondsToSelector:@selector(name)] && [[filter name] isEqualToString:@"blur"]) { if ([filter respondsToSelector:@selector(setValue:forKey:)]) { [filter setValue:@5 forKey:@"inputRadius"]; } } } } } } } } [CATransaction commit]; }
Although this does not use the Private API as such, it begins to delve into the hierarchy of layers that you don’t have, so be sure to double check that what you return is what you expect and unsuccessfully elegant, if not, For example , on 10.10 Yosemite, the Backdrop layer was a direct decade in the Visual Effect view, so this could change in the future.
source share