Effect
@objcMembers
@objc(PESDKEffect)
open class Effect : NSObject
The base class for effects that can be applied to a photo. It is meant to be subclassed.
-
The identifier of the effect.
Declaration
Swift
public let identifier: String
-
The name that is displayed to the user.
Declaration
Swift
public let displayName: String
-
Returns a new
CIFilter
object that implements the actual effect. Subclasses need to override this method.Declaration
Swift
open var newEffectFilter: CIFilter? { get }
-
Initializes the base class
Effect
. Use this initilizer in subclasses only and make sure to overridenewEffectFilter
.Declaration
Swift
public init(identifier: String, displayName: String)
Parameters
identifier
An identifier that uniquely identifies the effect.
displayName
The name that is displayed to the user.
Return Value
A newly initialized
Effect
object. -
Creates a no-op effect.
Declaration
Swift
public override init()
Return Value
A newly initialized
Effect
object that behaves like aNoEffect
object. -
Creates the default effects that are shipped with the SDK.
Declaration
Swift
public class var defaultItems: [Effect] { get }
-
Change this array to only support a subset of all available filters or to include custom filters. By default this array includes all available filters.
Note
This is a wrapper forAssetCatalog.shared
.Declaration
Swift
public static var all: [Effect] { get set }
-
This method returns the effect with the given identifier if such an effect exists.
Note
This is a wrapper for
AssetCatalog.shared
.Declaration
Swift
public static func effect(withIdentifier identifier: String) -> Effect?
Parameters
identifier
The identifier of the effect.
Return Value
A
Effect
object.