I'm learning working with CoreAnimation. I've tried to add some CIFilter to my NSView, but had a problem.
When I add filter to my view (view has NSButton as subview), it just clear all of its content, but it shouldn't!
Could you help me, what I'm doing wrong?
subView.wantsLayer = YES;
CIVector *center = [CIVector vectorWithX:NSMidX([subView bounds])
Y:NSMidY([subView bounds])];
CIFilter *pointalize = [CIFilter filterWithName: @"CIPointillize"];
[pointalize setDefaults];
[pointalize setValue: @(1.0) forKey: kCIInputRadiusKey];
[pointalize setValue: center forKey: kCIInputCenterKey];
pointalize.name = @"pointalize";
[subView setContentFilters: @[pointalize]];