Skip to main content
Language

Configure Stickers

VideoEditor SDK supports several configuration options for the StickerToolController allowing flexible adaptation to different needs and use cases. For a detailed explanation of how to configure different editor views, refer to this guide.

Selecting specific sticker categories#

The editor provides a variety of different stickers out of the box. For our example, we only want to use stickers belonging to the "Shapes" category, for instance, to support an annotation use case. To that end, we select shape stickers from the AssetCatalog and assign them to the stickers property of the assetCatalog config object.

personalStickersEnabled#

The default configuration does not allow users to add custom stickers. In this example, we enable users to add stickers from the device by setting personalStickersEnabled to true.

stickerPreviewSize#

The default size of the sticker preview inside the sticker tool is set to CGSize(width: 44, height: 44). We can change it by setting stickerPreviewSize, in this example we want it to be slightly larger at 60px.

allowedStickerActions#

Configuring the StickerOptionsToolController allows changing how users can interact with a given sticker. The actions users can perform are configured via the allowedStickerActions property. In our example, only allow changing the duration, replacing stickers, and changing the color. For a complete list of available sticker actions consult the API docs

availableColors#

Configuring the StickerColorToolController allows changing which colors users can use to customize stickers. Here, we assign an array of Color objects containing the UIColors we want to make available.