StickerCategory
@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 identifier of this category.
Declaration
Swift
public let identifier: String
-
The title of this category, e.g. ‘Toy Collection’.
Declaration
Swift
public let title: String
-
The URL of the category’s preview image. This can be a file url or a remote url.
Declaration
Swift
public let imageURL: URL
-
The stickers associated with this category.
Declaration
Swift
public let stickers: [Sticker]
-
Restrict this category to be shown only for a specific product. It defaults to
nil
which means that it is always visible.Declaration
Swift
public var product: LicenseProduct?
-
Creates a sticker category with an image url. The associated image is automatically loaded when needed.
Declaration
Swift
public convenience 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.
-
Creates a sticker category with an image url. The associated image is automatically loaded when needed.
Declaration
Swift
public init(identifier: String, title: String, imageURL: URL, stickers: [Sticker])
Parameters
identifier
The identifier of this category.
title
The title of this category, e.g. ‘Toy Collection’.
imageURL
The url of the category’s preview image.
stickers
The stickers to associate with this category.
-
The pool of categories available within the SDK.
Note
This is a wrapper forAssetCatalog.shared
.Declaration
Swift
public static var all: [StickerCategory] { get set }
-
Creates the default sticker categories that are shipped with the SDK.
Declaration
Swift
@available(*, deprecated, renamed: "defaultItems") open class func createDefaultStickerCategories() -> [StickerCategory]
Return Value
An array of sticker categories.
-
Creates the default sticker categories that are shipped with the SDK.
Declaration
Swift
public class var defaultItems: [StickerCategory] { get }