SealedVoucherView
@interface SealedVoucherView : UIView
SealedVoucherView is a sealed EnvelopeView. It shows ribbons and a seal overtop of an EnvelopeView.
-
Sets the wrapping paper, seal Image url and theme for a
SealedVoucherView.Declaration
Objective-C
- (void)setWrappingPaperMedia:(nonnull WrappingPaperMedia *)wrappingPaperMedia sealImageUrl:(nonnull NSString *)sealImageUrl vouchrTheme:(nonnull VouchrTheme *)vouchrTheme;Swift
func setWrappingPaperMedia(_ wrappingPaperMedia: WrappingPaperMedia, sealImageUrl: String, vouchrTheme: VouchrTheme)Parameters
wrappingPaperMedia- The
WrappingPaperMediathat will be shown on theEnvelopeViewinside theSealedVoucherView. Also provides the ribbon color.sealImageUrl- The image that is shown on the seal of the
SealedVoucherView.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
SealedVoucherView.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
SealedVoucherView.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
SealedVoucherView.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.
-
Hides the
SealedVoucherView, but still allows touches to be received.Declaration
Objective-C
- (void)removeShadowAndHideEnvelope;Swift
func removeShadowAndHideEnvelope()
View on GitHub
SealedVoucherView Class Reference