0

I am displaying a modal UIViewController on top of another. If the requisite UIPanGestureRecognizer triggers, I have an interactive UIPercentDrivenInteractiveTransition which basically pulls the modal view down to eventually dismiss it.

I notice that the view controller beneath does not receive any of the usual appearance methods when typically presenting and dismissing view controllers: -viewWillAppear:,-viewWillDisappear, etc.

Is there any way, considering that this is an Apple-provided view controller API, to have these methods still be called at the appropriate times during the interaction?

Ricky
  • 3,101
  • 1
  • 25
  • 33
  • Possible duplicate of [Custom transition animation not calling VC lifecycle methods on dismiss](https://stackoverflow.com/questions/25488267/custom-transition-animation-not-calling-vc-lifecycle-methods-on-dismiss) – Andreas Oetjen Oct 25 '18 at 06:37

1 Answers1

0
  1. Make sure you're calling transitionContext.completeTransition within your custom transition class which handles all the animations and gestures.

  2. It may depend on the type of UIModalPresentationStyle you're using. Some styles don't trigger the appearance methods.

    see here for example.

cohen72
  • 2,830
  • 29
  • 44