VoucherCreationViewControllerProtocol
@protocol VoucherCreationViewControllerProtocol <NSObject>
The VoucherCreationViewController
is the screen responsible for presenting all personalization options and provides visual feedback for alterations to the Voucher
.
-
This callback can be used to receive a ‘CreationItemImageView’ thumbnail representation of the personalization option added from a default Personalization Screen.
Note
Called each time a personalization is added to the voucher.Declaration
Objective-C
- (void)didUpdateVoucherWithCreationItemImageView: (nullable CreationItemImageView *)creationItemImageView withCompletion: (nullable void (^)(void))completion;
Swift
optional func didUpdateVoucher(with creationItemImageView: CreationItemImageView?, withCompletion completion: (() -> Void)? = nil)
Parameters
creationItemImageView
- A ‘CreationItemImageView’ with a thumbnail personalization image.
-
This callback can be used to update the wrapping paper media of your gift package.
Declaration
Objective-C
- (void)didUpdateVoucherWithWrappingPaper: (nonnull WrappingPaperMedia *)wrappingPaperMedia;
Swift
optional func didUpdateVoucher(withWrappingPaper wrappingPaperMedia: WrappingPaperMedia)
Parameters
wrappingPaperMedia
- ‘ImageMedia’ subclass that contains updated wrapping paper image data.
-
This callback can be used to update the creation items array after they have been rearranged in the ‘PreviewVoucherContentsViewController’.
Declaration
Objective-C
- (void)didEditVoucherWithRearrangedCreationItems: (nonnull NSMutableArray<CreationItemImageView *> *)creationItems;
Swift
optional func didEditVoucher(withRearrangedCreationItems creationItems: NSMutableArray)
Parameters
creationItems
- An updated ‘CreationItemImageView’ array with new sequencing.
-
This callback can be used to update the creation items array after an item was deleted in the ‘PreviewVoucherContentsViewController’.
Declaration
Objective-C
- (void)didEditVoucherWithDeletedCreationItems: (nonnull NSMutableArray<CreationItemImageView *> *)creationItems;
Swift
optional func didEditVoucher(withDeletedCreationItems creationItems: NSMutableArray)
Parameters
creationItems
- An updated ‘CreationItemImageView’ array with removed items.