Contents

layerUsesCoreImageFilters

A Boolean value indicating whether the view’s layer uses Core Image filters and needs in-process rendering.

Declaration

var layerUsesCoreImageFilters: Bool { get set }

Discussion

If your view uses a custom layer and you assigned Core Image to that layer directly, you must set this property to true to let AppKit know of that fact. In macOS 10.9 and later, AppKit prefers to render layer trees out-of-process but cannot do so if any layers have Core Image filters attached to them. Specifying true for property lets AppKit know that it must move rendering of the layer hierarchy back into your app’s process. If the value of this property is false, adding a filter to the view’s layer triggers an exception.

You do not need to modify this property if you assigned the filters using the backgroundFilters, compositingFilter, or contentFilters properties of the view. Those methods automatically let AppKit know that it needs to render the layer hierarchy in-process. Set it only if you set the filters on the layer directly.

See Also

Related Documentation

Managing the View’s Layer