VOSealedVoucherView

@interface VOSealedVoucherView : UIView

VOSealedVoucherView is a sealed VOEnvelopeView. It shows ribbons and a seal overtop of an VOEnvelopeView.

  • Sets the wrapping paper, seal Image url and theme for a VOSealedVoucherView.

    Declaration

    Objective-C

    - (void)setWrappingPaperMedia:(nonnull VOWrappingPaperMedia *)wrappingPaperMedia
                     sealImageUrl:(nonnull NSString *)sealImageUrl
                      vouchrTheme:(nonnull VOTheme *)vouchrTheme;

    Swift

    func setWrappingPaperMedia(_ wrappingPaperMedia: VOWrappingPaperMedia, sealImageUrl: String, vouchrTheme: VOTheme)

    Parameters

    wrappingPaperMedia

    - The VOWrappingPaperMedia that will be shown on the VOEnvelopeView inside the VOSealedVoucherView. Also provides the ribbon color.

    sealImageUrl

    - The image that is shown on the seal of the VOSealedVoucherView.

    vouchrTheme

    - The theme used to style the ribbon color if not provided by the WrappingPaper.

  • Setter to change between a small and large seal on the VOSealedVoucherView.

    Declaration

    Objective-C

    - (void)setShowLargeSeal:(BOOL)showLargeSeal;

    Swift

    func setShowLargeSeal(_ showLargeSeal: Bool)

    Parameters

    showLargeSeal

    - YES if a large seal should be shown, NO for a small seal.

  • Sets the width of the border on the Gift Seal. Default width is 5.

    Declaration

    Objective-C

    - (void)setGiftSealBorderWidth:(CGFloat)width;

    Swift

    func setGiftSealBorderWidth(_ width: CGFloat)

    Parameters

    width

    - The desired width of the gift seal border.

  • Removes the seal and ribbon from the VOSealedVoucherView.

    Declaration

    Objective-C

    - (void)removeRibbonAndSealWithAnimation:(BOOL)shouldAnimate
                                onCompletion:(nullable void (^)(void))completion;

    Swift

    func removeRibbonAndSeal(withAnimation shouldAnimate: Bool, onCompletion completion: (() -> Void)? = nil)

    Parameters

    shouldAnimate

    - Whether removing of the seal and ribbon should be animated.

    completion

    - Block that is called when the ribbon and seal has been removed.

  • Adds the ribbon and seal to the VOSealedVoucherView.

    Declaration

    Objective-C

    - (void)addRibbonAndSealWithRibbonAnimation:(BOOL)shouldAnimateRibbon
                                  sealAniamtion:(BOOL)shouldAnimateSeal
                                   onCompletion:(nullable void (^)(void))completion;

    Swift

    func addRibbonAndSeal(withRibbonAnimation shouldAnimateRibbon: Bool, sealAniamtion shouldAnimateSeal: Bool, onCompletion completion: (() -> Void)? = nil)

    Parameters

    shouldAnimateRibbon

    - Whether adding of the ribbon should be animated.

    shouldAnimateSeal

    - Whether adding of the seal should be animated.

    completion

    - Block that is called when the ribbon and seal has been added.