VORevealPersonalizationViewControllerProtocol
@protocol VORevealPersonalizationViewControllerProtocol <NSObject>
VORevealPersonalizationViewControllerProtocol
is the interface for any view controllers that are presented from the VOVoucherRevealViewController
when gift elements are tapped by the user in the reveal view controller.
-
Default initializer for view controller’s presented from the
VOVoucherRevealViewController
when elements are tapped.Declaration
Objective-C
+ (instancetype)viewControllerWithRevealManager: (VOVoucherRevealManager *)revealManager object:(id)object;
Swift
static func viewController(with revealManager: VOVoucherRevealManager!, object: Any!) -> Self!
Parameters
revealManager
- The
VOVoucherRevealManager
used to initialize theVOVoucherRevealViewController
.object
- The object associated with the cell that was tapped by the user. Either a
VOVoucherMedia
or aVOMerchant
.Return Value
an instance of a view controller.
-
Whether this view controller supports displaying this
VOVoucherMedia
.Declaration
Objective-C
+ (BOOL)supportsVoucherMedia:(VOVoucherMedia *)voucherMedia;
Swift
optional static func supportsVoucherMedia(_ voucherMedia: VOVoucherMedia!) -> Any!
Parameters
voucherMedia
- The voucher media that should be displayed.
Return Value
true if the view controller can display the voucher media, false otherwise.
-
Whether this view controller supports displaying this
VOMerchant
.Declaration
Objective-C
+ (BOOL)supportsMerchant:(VOMerchant *)merchant;
Swift
optional static func supportsMerchant(_ merchant: VOMerchant!) -> Any!
Parameters
merchant
- The merchant that should be displayed.
Return Value
true if the view controller can display the merchant, false otherwise.
-
Passes in the view of the cell that was tapped on from the
VOVoucherRevealViewController
that can be used to animate the transition of the view controller. If implementing this method, when the view controller dismisses, if the position / transform of this view is changed, it should be returned to its original position and transform.Declaration
Objective-C
- (void)setOriginatingView:(UIView *)view;
Swift
optional func setOriginatingView(_ view: Any!)
Parameters
view
- the cell from the
VOVoucherRevealViewController
. -
Hides and disables user interaction on the close button for this viewController when presented in
VOMediaGalleryViewController
Note
For use when a viewController that conforms to this protocol is presented withinVOMediaGalleryViewController
to prevent mutltiple close buttons from being displayed.Declaration
Objective-C
- (void)hideAndDisableCloseButton;
Swift
optional func hideAndDisableCloseButton()