The reveal flow allows a user to open a voucher and view its contents. Use the CreationManager to start the reveal flow for a voucher.

[self.creationManager.revealFlowCoordinator updateCurrentVoucherWithNewVoucher:voucher];
[self.creationManager.revealFlowCoordinator startFlowOnViewController:self revealMode:revealMode backgroundColor:nil];
creationManager.revealFlowCoordinator.updateCurrentVoucher(withNewVoucher: voucher)
creationManager.revealFlowCoordinator.startFlow(on: self, revealMode: revealMode, backgroundColor: nil)

The revealMode can be one of the of following values:

  • RevealModeDefault: VoucherRevealViewController is shown to the claimer.
  • RevealModePreview: VoucherRevealViewController is shown to the creator when they are previewing their Voucher.
  • RevealModeContribute: VoucherRevealViewController is shown to a user who wants to contribute to the Voucher.
  • RevealModeSent: VoucherRevealViewController is shown to creator when they are viewing a previously sent Voucher.
  • RevealModeReceived: VoucherRevealViewController is shown to recipient when they are viewing a previously received Voucher.

Customizing the reveal

The reveal can be customized using the RevealManager. See the VoucherRevealManagerBuilder for all the customization options.

VoucherRevealManager *revealManager = [VoucherRevealManager voucherRevealManagerWithBuilder:^(VoucherRevealManagerBuilder *builder) {
    builder.revealViewControllerTheme = self.theme;        
    builder.gameViewControllerTheme = self.theme;
    //any additional customizations
}];
let revealManager = VoucherRevealManager(builder: { builder in
    builder.revealViewControllerTheme = self.theme
    builder.gameViewControllerTheme = self.theme
    //any additional customizations
})