VoucherCreationViewController

@interface VoucherCreationViewController : UIViewController

The VoucherCreationViewController is the screen responsible for presenting all personalization options and provides visual feedback for alterations to the Voucher. This screen contains the carousel of personalization options at the top and the envelope containing the personalizations below.

  • Starts the creation of a new Voucher with contents of an existing Voucher. All personalizations in the passed in voucher will be visualized in the envelope.

    Declaration

    Objective-C

    - (void)populateWithVoucher:(nonnull Voucher *)voucher;

    Swift

    func populate(with voucher: Voucher)

    Parameters

    voucher

    - The Voucher object to populate from.

  • Reopens envelope and returns to creation state when an user cancels a Voucher on the confirmation screen.

    Declaration

    Objective-C

    - (void)reopenEnvelope;

    Swift

    func reopenEnvelope()
  • Adds a recorded video to the Voucher being created.

    Declaration

    Objective-C

    - (void)addRecordedVideoWithVideoUrl:(nonnull NSURL *)videoUrl
                               thumbnail:(nonnull NSData *)thumbnail
                     analyticsDictionary:
                         (nonnull NSMutableDictionary *)analyticsDictionary;

    Swift

    func addRecordedVideo(withVideoUrl videoUrl: URL, thumbnail: Data, analyticsDictionary: NSMutableDictionary)

    Parameters

    videoUrl

    - The URL of the video recorded.

    thumbnail

    - The thumbnail of the video recorded.

    analyticsDictionary

    - Information regarding the recorded video that needs to be tracked.