I have a parent view controller with embedded child view controller. When user taps the child, I would like to present its view in full screen mode with 'extending frame' animation. A similar UI paradigm is used for instance to zoom pictures in the Facebook and 9GAG app.
Am I supposed to create a new controller for the full screen mode presentation and animate it as if it was merely on top of the child view controller? Or should I animate the child's view to extend to the superview's bounds?
I've heard about custom subclasses of UIStoryboardSegue
and UIViewControllerTransitioning
. Are these approaches applicable in my case?
What is the best way to accomplish this?
Thanks in advance. Pete.
P. S. After resolving this issue, I would like to extend my transition with interactive pinch-to-zoom gesture. If user touches the child view with two fingers, the frame animation reacts to the taps. When user puts his finger away, the animation should either revert, returning child's view to its original frame, or continue as if the user tapped the view.