Instance Property


A CoreImage filter used to composite the layer and the content behind it. Animatable.


@property(strong) id compositingFilter;


The default value of this property is nil, which causes the layer to use source-over compositing. Although you can use any Core Image filter as a layer's compositing filter, for best results, use those in the CICategoryCompositeOperation category.

In macOS, it is possible to modify the filter’s parameters after attaching it to the layer but you must use the layer’s setValue:forKeyPath: method to do so. For example, to change the inputRadius parameter of the filter, you could use code similar to the following:

CIFilter *filter = ...;
CALayer *layer = ...;
layer.compositingFilter = filter;
[layer setValue:[NSNumber numberWithInt:1] forKeyPath:@"compositingFilter.inputRadius"];

Changing the inputs of the CIFilter object directly after it is attached to the layer causes undefined behavior.

Special Considerations

This property is not supported on layers in iOS.

See Also

Layer Filters


An array of Core Image filters to apply to the contents of the layer and its sublayers. Animatable.


An array of Core Image filters to apply to the content immediately behind the layer. Animatable.


The filter used when reducing the size of the content.


The bias factor used by the minification filter to determine the levels of detail.


The filter used when increasing the size of the content.