PreviewVoucherContentsViewControllerDelegate
@protocol PreviewVoucherContentsViewControllerDelegate <NSObject>
PreviewVoucherContentsViewControllerDelegate is the delegate used for passing information between the edit view controller and the VoucherCreationViewController. If a different edit view controller than the default PreviewVoucherContentsViewController, implement this delegate inside the overridden view controller.
-
This is called when the edit view controller completes with reordered items.
Declaration
Objective-C
- (void)editVoucherContentsViewControllerCompletedWithRearrangedItems: (NSMutableArray<CreationItemImageView *> *)creationItems;Swift
func editVoucherContentsViewControllerCompleted(withRearrangedItems creationItems: NSMutableArray!) -
This is called when the edit view controller completes with deleted items.
Declaration
Objective-C
- (void)editVoucherContentsViewControllerCompletedWithDeletedItems: (NSMutableArray<CreationItemImageView *> *)creationItems;Swift
func editVoucherContentsViewControllerCompleted(withDeletedItems creationItems: NSMutableArray!)Parameters
creationItems- the removed items.
-
This is called when the edit view controller completes with an edited item.
Declaration
Objective-C
- (void)editVoucherContentsViewControllerCompletedWithEditingItem: (CreationItemImageView *)creationItem;Swift
func editVoucherContentsViewControllerCompleted(withEditingItem creationItem: CreationItemImageView!)Parameters
creationItem- the item that should be edited.
-
Undocumented
Declaration
Objective-C
- (void)launchCreationScreenOnViewController:(UIViewController *)viewController personalizationOptions:(nullable NSArray <PersonalizationOption *> *)personalizationOptions;Swift
optional func launchCreationScreen(on viewController: UIViewController!, personalizationOptions: [PersonalizationOption]?) -
This is called by
VoucherCreationViewControllerto drop prepopulated items into the envelope, and update the currentVoucherwith the new content.Declaration
Objective-C
- (void) dropPrepopulatedCreationItemsIntoEnvelopeWithVoucher:(Voucher *)voucher creationItems: (NSArray<CreationItemImageView *> *) creationItems;Swift
optional func dropPrepopulatedCreationItemsIntoEnvelope(with voucher: Voucher!, creationItems: [CreationItemImageView]!)Parameters
voucher-
Voucherto be updated with the new content.creationItems- an array of
CreationItemImageViewspecified from prepopulation configurations. -
This delegate method is called after a personalization screen completes with a personalizedObject. If using a non-default Personalization View Controller, it is recommended implementing this method. This method can still be overridden if using a default Personalization View Controller, if you want something other than the default
CreationItemImageView.Declaration
Objective-C
- (CreationItemImageView *) creationItemImageViewForPersonalizationOption: (PersonalizationOption *)personalizationOption personalizedObject:(id)personalizedObject;Swift
optional func creationItemImageView(for personalizationOption: PersonalizationOption!, personalizedObject: Any!) -> CreationItemImageView!Parameters
personalizationOption- the personalization option that was selected by the user.
personalizedObject- the object returned by the Personalization View Controller.
Return Value
CreationItemImageView - the
CreationItemImageViewto be dropped in theEnvelopeView. Nil if the default should be used.
View on GitHub
PreviewVoucherContentsViewControllerDelegate Protocol Reference