StickerToolControllerOptions
@objcMembers
@objc(PESDKStickerToolControllerOptions)
open class StickerToolControllerOptions : ToolControllerOptions
Options for configuring a StickerToolController
.
-
This closure is called when the user adds a sticker.
Declaration
Swift
public let addedStickerClosure: ((Sticker) -> Void)?
-
This closure allows further configuration of the sticker category buttons. The closure is called for each sticker category button and has the button and its corresponding sticker category as parameters.
Declaration
Swift
public let stickerCategoryButtonConfigurationClosure: ((MenuCollectionViewCell, StickerCategory) -> Void)?
-
This closure allows further configuration of the sticker buttons. The closure is called for each sticker button and has the button and its corresponding sticker as parameters.
Declaration
Swift
public let stickerButtonConfigurationClosure: ((StickerCollectionViewCell, Sticker) -> Void)?
-
The size of the stickers in the preview. Default is
(44, 44)
.Declaration
Swift
public let stickerPreviewSize: CGSize
-
The index of the sticker category that should be selected when initially presenting the tool. If this index is larger than the number of available categories, the first category will be used. Default is
0
.Declaration
Swift
public let defaultStickerCategoryIndex: Int
-
Whether the user can create personal stickers from the device’s photo library. If
true
an action button is added as first item in the menu in front of the sticker categories which modally presents anUIImagePickerController
for personal sticker creation. Personal stickers will be added to a personal sticker category which will be added between the action button and the regular sticker categories if it does not exist. Default isfalse
.Declaration
Swift
public let personalStickersEnabled: Bool
-
The default tint mode for personal stickers. Default is
StickerTintMode.none
.Declaration
Swift
public let defaultPersonalStickerTintMode: StickerTintMode
-
The weather provider used for all smart weather stickers. The default is
nil
which will hide all smart weather stickers orMultiImageSticker
s that contain smart weather stickers from theStickerSelectionController
.Declaration
Swift
public let weatherProvider: WeatherProvider?
-
This closure allows for further customization of personal stickers. When it is set it will be called after a user selected a sticker from their photo roll. You could for example use this to present another instance of PhotoEditor SDK to allow your users to edit the selected sticker before placing it on top of the original photo. It is passed a reference to the instance of
StickerToolController
that calls this closure, an instance ofURL
pointing to the user’s selected sticker and a completion handler, that you must call with theURL
to your modified sticker after you’re done with your customizations.Declaration
Swift
public let personalStickerCustomizationClosure: ((StickerToolController, URL, @escaping (URL?) -> Void) -> Void)?
-
Creates a new instance of
StickerToolControllerOptions
using the given builder.Declaration
Swift
public init(builder: StickerToolControllerOptionsBuilder)
Parameters
builder
A
StickerToolControllerOptionsBuilder
object.