Overlay
@objcMembers
@objc(PESDKOverlay)
open class Overlay : NSObject
An Overlay
represents a unique overlay that can be added to a photo.
-
This string is used to identify the overlay. It must be unique.
Declaration
Swift
public private(set) var identifier: String { get }
-
The URL of the image.
Declaration
Swift
public private(set) var url: URL? { get }
-
The URL of the thumbnail for this overlay. If none is provided, the
url
will be used.Declaration
Swift
public private(set) var thumbnailURL: URL? { get }
-
This string will be used within the UI.
Declaration
Swift
public private(set) var displayName: String { get }
-
This mode will be set when the overlay is selected in the UI.
Declaration
Swift
public private(set) var initialBlendMode: BlendMode { get }
-
Initialize a new Overlay
Declaration
Swift
public init(identifier: String, displayName: String, url: URL?, thumbnailURL: URL? = nil, initialBlendMode: BlendMode)
Parameters
identifier
An identifier.
displayName
This will be used within the UI.
url
The URL of the image.
thumbnailURL
The URL of the thumbnail for this overlay. If none is provided, the
url
will be used. -
Get the overlay from the pool with the given identifier.
Note
This is a wrapper for
AssetCatalog.shared
.Declaration
Swift
public static func overlay(withIdentifier identifier: String) -> Overlay?
Parameters
identifier
An identifier.
Return Value
The overlay that matches the identifier,
nil
otherwise. -
This is a special case of an overlay. It means, apply no overlay at all.
Declaration
Swift
public static var none: Overlay { get }
-
Creates the default overlays that are shipped with the SDK.
Declaration
Swift
public class var defaultItems: [Overlay] { get }
-
This array represents the pool of overlays available to the SDK.
Note
This is a wrapper forAssetCatalog.shared
.Declaration
Swift
public static var all: [Overlay] { get set }