VOPersonalizationOptionViewControllerProtocol
@protocol VOPersonalizationOptionViewControllerProtocol <NSObject>
VOPersonalizationOptionViewControllerProtocol
is the interface for all of the default personalization option view controllers.
-
Used to pass information back from the personalization view controllers to the voucher creation view controller (or parent if not using voucher creation view controller).
Declaration
Objective-C
@property (readwrite, nonatomic) id<VOPersonalizationOptionViewControllerDelegate> delegate;
Swift
weak var delegate: VOPersonalizationOptionViewControllerDelegate! { get set }
-
Default initializer for the personalization option view controllers.
Declaration
Objective-C
+ (instancetype) viewControllerWithPersonalizationOption: (VOPersonalizationOption *)personalizationOption createManager: (VOVoucherCreationManager *)createManager createFlowDelegate:(id<VOVoucherCreationFlowDelegate>) createFlowDelegate;
Parameters
personalizationOption
- the
VOPersonalizationOption
for this personalization view controllercreateManager
- the
VOVoucherCreationManager
used for creating thisVOVoucher
.createFlowDelegate
- An additional delegate that delegates outside of the VouchrSDK.
-
Whether this view controller can handle a specific
VOPersonalizationOption
.Declaration
Objective-C
+ (BOOL)supportsPersonalizationOption: (VOPersonalizationOption *)personalizationOption;
Swift
static func supportsPersonalizationOption(_ personalizationOption: VOPersonalizationOption!) -> Any!
Parameters
personalizationOption
- The personalization option that is looking for support.
Return Value
YES if this view controller supports the
VOPersonalizationOption
, NO otherwise. -
In the event where there is more than one screen / method of interacting with a specific
VOPersonalizationOption
(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
+ (VOActionSheetItem *)actionSheetItemForPersonalizationOption: (VOPersonalizationOption *)personalizationOption;
Swift
optional static func actionSheetItem(for personalizationOption: VOPersonalizationOption!) -> VOActionSheetItem!
Parameters
personalizationOption
- The personalization option that has been selected by the creator.
Return Value
Instance of
VOActionSheetItem
.