VOVoucherCreationViewControllerProtocol

@protocol VOVoucherCreationViewControllerProtocol <NSObject>

The voucher creation view controller is the screen responsible for presenting all personalization options and provides visual feedback for alterations to the VOVoucher.

  • This callback can be used to receive a ‘VOCreationItemView’ 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)didUpdateVoucherWithCreationItemView:
                (nullable VOCreationItemView *)creationItemView
                                  withCompletion:
                                      (nullable void (^)(void))completion;

    Swift

    optional func didUpdateVoucher(with creationItemView: VOCreationItemView?, withCompletion completion: (() -> Void)? = nil)

    Parameters

    creationItemView

    - A ‘VOCreationItemView’ 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 VOWrappingPaperMedia *)wrappingPaperMedia;

    Swift

    optional func didUpdateVoucher(withWrappingPaper wrappingPaperMedia: VOWrappingPaperMedia)

    Parameters

    wrappingPaperMedia

    - ‘VOImageMedia’ 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 ‘VOPreviewVoucherContentsViewController’.

    Declaration

    Objective-C

    - (void)didEditVoucherWithRearrangedCreationItems:
        (nonnull NSMutableArray<VOCreationItemView *> *)creationItems;

    Swift

    optional func didEditVoucher(withRearrangedCreationItems creationItems: NSMutableArray)

    Parameters

    creationItems

    - An updated ‘VOCreationItemView’ array with new sequencing.

  • This callback can be used to update the creation items array after an item was deleted in the ‘VOPreviewVoucherContentsViewController’.

    Declaration

    Objective-C

    - (void)didEditVoucherWithDeletedCreationItems:
        (nonnull NSMutableArray<VOCreationItemView *> *)creationItems;

    Swift

    optional func didEditVoucher(withDeletedCreationItems creationItems: NSMutableArray)

    Parameters

    creationItems

    - An updated ‘VOCreationItemView’ array with removed items.