SCSDKSnapSticker

Objective-C

@interface SCSDKSnapSticker : NSObject

Swift

class SCSDKSnapSticker : NSObject

SCSDKSnapSticker class provides a way to model stickers for overlaying on top of Snaps shared using SnapKit

  • @property stickerImage @brief UIImage to be used as sticker

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly) UIImage *_Nullable stickerImage;

    Swift

    var stickerImage: UIImage? { get }
  • @property stickerUrl @brief File URL to the file to be used as sticker. Only .gif or .webp file formats are supported for animated images.

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly) NSURL *_Nullable stickerUrl;

    Swift

    var stickerUrl: URL? { get }
  • @property isAnimated @breif Whether or not sticker is animated. If YES and using stickerImage projerty, stickerImage must be an animated UIImage.

    Declaration

    Objective-C

    @property (nonatomic, readonly) BOOL isAnimated;

    Swift

    var isAnimated: Bool { get }
  • @property rotation @brief Desired sticker rotation

    Declaration

    Objective-C

    @property (nonatomic) CGFloat rotation;

    Swift

    var rotation: CGFloat { get set }
  • @property posX @brief Horizontal position of sticker’s center

    Declaration

    Objective-C

    @property (nonatomic) CGFloat posX;

    Swift

    var posX: CGFloat { get set }
  • @property posY @brief Horizontal position of sticker’s center

    Declaration

    Objective-C

    @property (nonatomic) CGFloat posY;

    Swift

    var posY: CGFloat { get set }
  • @property width @brief Fixed width of sticker (in points). If fixed size is not provided, sticker will scale with a default max size of 200.

    Declaration

    Objective-C

    @property (nonatomic) CGFloat width;

    Swift

    var width: CGFloat { get set }
  • @property height @brief Fixed height of sticker (in points). If fixed size is not provided, sticker will scale with a default max size of 200.

    Declaration

    Objective-C

    @property (nonatomic) CGFloat height;

    Swift

    var height: CGFloat { get set }
  • Initializes an SCSDKSnapSticker instance.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithStickerImage:(nonnull UIImage *)stickerImage;

    Swift

    init(stickerImage: UIImage)

    Parameters

    stickerImage

    UIImage to be used as a sticker.

    Return Value

    An SCSDKSnapSticker instance initialized stickerImage.

  • Initializes an SCSDKSnapSticker instance.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithStickerUrl:(nonnull NSURL *)stickerUrl
                                    isAnimated:(BOOL)isAnimated;

    Swift

    init(stickerUrl: URL, isAnimated: Bool)

    Parameters

    stickerUrl

    NSURL of an image file on disk to be used as a sticker.

    isAnimated

    BOOL value indicating whether or not sticker is animated.

    Return Value

    An SCSDKSnapSticker instance initialized with stickerUrl.