I'm implementing a custom segue with zooming animations between A view and B view. My thought is described as below.
When segue goes from A to B:
Save a snapshot image of the B view, add this image view into A view as A's subview
Perform zoom-in animation of the fake image view (it acts like the B view goes larger and larger until it fills the entire screen)
When the zoom-in animation completes, push the real B view with no animation using navigation controller and remove the fake image view from A view
When segue goes from B to A (unwind):
Save a snapshot image of B view, add it into A view as A's subview and bring it to front
Pop B view with no animation using navigation controller
Perform zooming-out animation of the fake image view (it acts like the B view goes smaller and smaller until it is too small to see)
It works fine in A to B case, while in B to A case, after step 2, the real B view should be gone and there is a fake image view of B on top of A view. Here comes the problem, if the fake image view of B was not removed from the A view's subviews after step 3, when A view appears, B should still exists in A's subviews but it seems this subview was gone.
I have found a same problem here: View transition doesn't animate during custom pop segue but nobody was answering it.
So, anyone any ideas?