AssetCatalog

@available(iOS 9.0, *)
@objcMembers
@objc(PESDKAssetCatalog)
public final class AssetCatalog : NSObject

An AssetCatalog configures all assets that are available to an editor instance for editing tasks, such as stickers, frames, effects, overlays, fonts, and text designs.

Properties

  • This array contains all available stickers.

    Declaration

    Swift

    public var stickers: [StickerCategory] { get set }
  • This array contains all available frames.

    Declaration

    Swift

    public var frames: [Frame] { get set }
  • This array contains all available effects.

    Declaration

    Swift

    public var effects: [Effect] { get set }
  • This array contains all available overlays.

    Declaration

    Swift

    public var overlays: [Overlay] { get set }
  • This array contains all available fonts.

    Declaration

    Swift

    public var fonts: [Font] { get set }
  • This array contains all available text designs.

    Declaration

    Swift

    public var textDesigns: [TextDesign] { get set }

Singleton

  • Returns true if this AssetCatalog instance is the shared singleton instance.

    Declaration

    Swift

    public var isShared: Bool { get }
  • Creates a new asset catalog from global assets defined by the current state of the shared singleton instance.

    Declaration

    Swift

    public static var sharedItems: AssetCatalog { get }
  • Creates a new asset catalog from default assets defined by the defaultItems property of StickerCategory, Frame, Effect, Overlay, FontImporter, and TextDesign.

    Declaration

    Swift

    public static var defaultItems: AssetCatalog { get }

Initializers

Utilities

  • Removes empty categories and all temporarily created assets from this asset catalog, e.g., personal stickers by the user.

    Declaration

    Swift

    public func removeTemporaryItems()
  • Removes all temporarily created assets from this asset catalog, e.g., personal stickers by the user.

    Declaration

    Swift

    public func removeTemporaryItems(removeEmptyCategories: Bool)

    Parameters

    removeEmptyCategories

    If true empty categories, e.g., sticker categories, are removed as well.

Accessors

  • Returns the first sticker with the given identifier, if any.

    Declaration

    Swift

    public func sticker(withIdentifier identifier: String) -> Sticker?

    Parameters

    identifier

    The identifier of the sticker to look for.

    Return Value

    The sticker with the given identifier or nil.

  • Returns the first frame with the given identifier, if any.

    Declaration

    Swift

    public func frame(withIdentifier identifier: String) -> Frame?

    Parameters

    identifier

    The identifier of the frame to look for.

    Return Value

    The frame with the given identifier or nil.

  • Returns the first effect with the given identifier, if any.

    Declaration

    Swift

    public func effect(withIdentifier identifier: String) -> Effect?

    Parameters

    identifier

    The identifier of the effect to look for.

    Return Value

    The effect with the given identifier or nil.

  • Returns the first overlay with the given identifier, if any.

    Declaration

    Swift

    public func overlay(withIdentifier identifier: String) -> Overlay?

    Parameters

    identifier

    The identifier of the overlay to look for.

    Return Value

    The overlay with the given identifier or nil.

  • Returns the first font with the given identifier, if any.

    Declaration

    Swift

    public func font(withIdentifier identifier: String) -> Font?

    Parameters

    identifier

    The identifier of the font to look for.

    Return Value

    The font with the given identifier or nil.

  • Returns the first text design with the given identifier, if any.

    Declaration

    Swift

    public func textDesign(withIdentifier identifier: String) -> TextDesign?

    Parameters

    identifier

    The identifier of the text design to look for.

    Return Value

    The text design with the given identifier or nil.