StickerCategory

@available(iOS 9.0, *)
@objcMembers
@objc(PESDKStickerCategory)
open class StickerCategory : NSObject

A StickerCategory represents one category of stickers. Each category has a preview image and multiple stickers associated with it. To support accessibility you should also set its accessibilityLabel.

  • The title of this category, e.g. ‘Toy Collection’.

    Declaration

    Swift

    open let title: String
  • The URL of the category’s preview image. This can be a file url or a remote url.

    Declaration

    Swift

    open let imageURL: URL
  • The stickers associated with this category.

    Declaration

    Swift

    open let stickers: [Sticker]
  • Creates a sticker category with an image url. The associated image is automatically loaded when needed.

    Declaration

    Swift

    public init(title: String, imageURL: URL, stickers: [Sticker])

    Parameters

    title

    The title of this category, e.g. ‘Toy Collection’.

    imageURL

    The url for the category’s preview image.

    stickers

    The stickers to associate with this category.

  • all

    The pool of categories available within the SDK.

    Declaration

    Swift

    open static var all: [StickerCategory] { get set }
  • Creates the default sticker categories that are shipped with the SDK.

    Declaration

    Swift

    open class func createDefaultStickerCategories() -> [StickerCategory]

    Return Value

    An array of sticker categories.