Contents

init(name:)

Creates a Cifilter Swift.class object for a specific kind of filter.

Declaration

init?(name: String)

Parameters

  • name:

    The name of the filter. You must make sure the name is spelled correctly, otherwise your app will run but not produce any output images. For that reason, you should check for the existence of the filter after calling this method.

Return Value

A CIFilter object whose input values are undefined.

Discussion

In macOS, after creating a filter with this method you must call setDefaults() or set parameters individually by calling setValue(_:forKey:). In iOS, the filter’s parameters are automatically set to default values.

See Also

Related Documentation

  • Image Unit Tutorial
  • Core Image Filter Reference
  • Core Image Programming Guide

Creating a filter