Animating the background blur of a NSView that is layer backed
✓ Published0🌍 Public
KKevinGutowski
Last edited Jun 23, 2019
Created on Jun 23, 2019
This example demonstrates a layer-backed NSView that fades in with a Gaussian background blur over a fixed image, then reverses the effect. The animation cycles through a state where the view’s background transitions from fully transparent to a blurred, semi-transparent black overlay, using CABasicAnimation and CAAnimationGroup to coordinate opacity and blur radius changes. The code leverages the Objective-C libraries (NSView, CALayer, CIFilter) and the inherent layer-backing system to apply the blur filter via `CIGaussianBlur`, with timing controlled by `CAMediaTimingFunction`. The data source is a local PNG image file, and the animation runs on a timer, hiding the view after the fade-out completes.
AI-generated description