I\'ve implemented a custom transition between two view controllers in my iOS app and it worked fine with iOS 10, 11, and 12.
Now I want make it ready for iOS 13 using Xc
I set up the segue in IB by drag-and-drop from a collection VC to another VC, which is used to display details.
I have a new discoveries on this problem, To refer to 'toView' and 'fromView', both of the following methods work
Indirectly way:
transitionContext.viewController(forKey: .to)?.view
transitionContext.viewController(forKey: .from)?.view
Directly way:
transitionContext.view(forKey: .to)
transitionContext.view(forKey: .from)
But when I switched the segue style to 'Over Full Screen', the directly way return 'nil' for both 'toView' and 'fromView' and only indirectly way work.
Hope this will be helpful to someone in the future.
P.S. This is my discovery along my way to solve another problem, which might be helpful, if you also have encounter the problem that 'a working animator' stops working in iOS 13 and above