I have 2 nested view controllers with different animations. First one has alpha animation and second one moves from bottom to top with constraint.
My current implementation is just show/hide methods inside first view controller in which I run each animation manually with UIView.animate(withDuration:animations:). But it is not convenient for some reasons (for example I need to call custom methods instead of ones provided by iOS).
Is there a way somehow override present/dissmiss transition to allow to call default present/dismiss methods which will run my animations?
Found an appropriate answer here: https://habr.com/ru/articles/424853/
In short we create classes implementing
UIViewControllerAnimatedTransitioningand place all the animation inside them. Then we addUIViewControllerTransitioningDelegatesomewhere and assign its object astransitioningDelegate.