TCMaskViewDelegate

Swift

protocol TCMaskViewDelegate

Objective-C

@protocol TCMaskViewDelegate

Delegate methods for TCMaskView, which includes:

  • tcMaskViewDidExit: is called after TCMaskView exits
  • tcMaskViewDidComplete: is called after a popup TCMaskView completes
  • tcMaskViewWillPushViewController: is called before navigation controller is about to accomplish TCMaskView and process to the next UIViewController
  • Called when the user taps ‘X’ button and TCMaskView exits.

    Declaration

    Swift

    optional func tcMaskViewDidExit(mask: TCMask, image: UIImage)

    Objective-C

    - (void)tcMaskViewDidExitWithMask:(TCMask * _Nonnull)mask image:(UIImage * _Nonnull)image;

    Parameters

    mask

    Image masking result

    image

    The original image provided to TCMaskView when ‘present’ was called

  • Called when the user taps ‘✓’ button and €™TCMaskView completes.

    Declaration

    Swift

    optional func tcMaskViewDidComplete(mask: TCMask, image: UIImage)

    Objective-C

    - (void)tcMaskViewDidCompleteWithMask:(TCMask * _Nonnull)mask image:(UIImage * _Nonnull)image;

    Parameters

    mask

    Image masking result

    image

    The original image provided to TCMaskView when ‘present’ was called

  • Called when the user taps ’->’ button and UINavigationController is about to process to next UIViewController.

    Declaration

    Swift

    optional func tcMaskViewWillPushViewController(mask: TCMask, image: UIImage) -> UIViewController!

    Objective-C

    - (UIViewController * _Null_unspecified)tcMaskViewWillPushViewControllerWithMask:(TCMask * _Nonnull)mask image:(UIImage * _Nonnull)image;

    Parameters

    mask

    Image masking result

    image

    The original image provided to TCMaskView when ‘present’ was called

    Return Value

    The next UIViewController where UINavigationController is about to process to