PersonalizationOptionViewControllerProtocol
@protocol PersonalizationOptionViewControllerProtocol <NSObject>
PersonalizationOptionViewControllerProtocol is the interface for all of the default personalization option view controllers.
-
Used to pass information back from the personalization view controllers to the
VoucherCreationViewController(or parent if not usingVoucherCreationViewController).Declaration
Objective-C
@property (readwrite, nonatomic) id<PersonalizationOptionViewControllerDelegate> delegate;Swift
weak var delegate: PersonalizationOptionViewControllerDelegate! { get set } -
Default initializer for the personalization option view controllers.
Declaration
Objective-C
+ (instancetype) viewControllerWithPersonalizationOption: (PersonalizationOption *)personalizationOption createManager:(VoucherCreationManager *)createManager createFlowDelegate: (id<VoucherCreationFlowDelegate>)createFlowDelegate;Parameters
personalizationOption- the
PersonalizationOptionfor this personalization view controllercreateManager- the
VoucherCreationManagerused for creating thisVoucher.createFlowDelegate- An additional delegate that delegates outside of the VouchrSDK.
-
Whether this view controller can handle a specific
PersonalizationOption.Declaration
Objective-C
+ (BOOL)supportsPersonalizationOption: (PersonalizationOption *)personalizationOption;Swift
static func supportsPersonalizationOption(_ personalizationOption: PersonalizationOption!) -> Any!Parameters
personalizationOption- The personalization option that is looking for support.
Return Value
YES if this view controller supports the
PersonalizationOption, NO otherwise. -
In the event where there is more than one screen / method of interacting with a specific
PersonalizationOption(eg. the photo personalization can be created via the Camera Roll, or a web search), an action sheet is displayed to the user so that they can select the appropriate method.Declaration
Objective-C
+ (VouchrActionSheetItem *)actionSheetItemForPersonalizationOption: (PersonalizationOption *)personalizationOption;Swift
optional static func actionSheetItem(for personalizationOption: PersonalizationOption!) -> VouchrActionSheetItem!Parameters
personalizationOption- The personalization option that has been selected by the creator.
Return Value
Instance of
VouchrActionSheetItem.
View on GitHub
PersonalizationOptionViewControllerProtocol Protocol Reference