EditVoucherContentsViewControllerDelegate
@protocol EditVoucherContentsViewControllerDelegate <NSObject>
EditVoucherContentsViewControllerDelegate
is the delegate used for passing information between the edit view controller and the VoucherCreationViewController
. If a different edit view controller than the default EditVoucherContentsViewController
, implement this delegate inside the overridden view controller.
-
This is called when the edit view controller completes with deleted items.
Declaration
Objective-C
- (void)editVoucherContentsViewControllerCompletedWithRemovedItems: (NSArray<CreationItemImageView *> *)creationItems;
Swift
func editVoucherContentsViewControllerCompleted(withRemovedItems creationItems: Any!)
Parameters
creationItems
- the removed items.
-
This is called when the edit view controller completes with an edititing item.
Declaration
Objective-C
- (void)editVoucherContentsViewControllerCompletedWithEditingItem: (CreationItemImageView *)creationItem;
Swift
func editVoucherContentsViewControllerCompleted(withEditingItem creationItem: CreationItemImageView!)
Parameters
creationItem
- the item that should be edited.
-
This is called by
VoucherCreationViewController
to drop prepopulated items into the envelope, and update the currentVoucher
with the new content.Declaration
Objective-C
- (void) dropPrepopulatedCreationItemsIntoEnvelopeWithVoucher:(Voucher *)voucher creationItems: (NSArray<CreationItemImageView *> *) creationItems;
Swift
optional func dropPrepopulatedCreationItemsIntoEnvelope(with voucher: Voucher!, creationItems: Any!)
Parameters
voucher
-
Voucher
to be updated with the new content.creationItems
- an array of
CreationItemImageView
specified 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
CreationItemImageView
to be dropped in theEnvelopeView
. Nil if the default should be used.