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
VOVoucherRevealViewControllerwhen 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
VOVoucherRevealManagerused to initialize theVOVoucherRevealViewController.object- The object associated with the cell that was tapped by the user. Either a
VOVoucherMediaor 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
VOVoucherRevealViewControllerthat 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
VOMediaGalleryViewControllerNote
For use when a viewController that conforms to this protocol is presented withinVOMediaGalleryViewControllerto prevent mutltiple close buttons from being displayed.Declaration
Objective-C
- (void)hideAndDisableCloseButton;Swift
optional func hideAndDisableCloseButton()
View on GitHub
VORevealPersonalizationViewControllerProtocol Protocol Reference