I'm implementing my own custom UIViewController
transition and when I output to the debugger the frame of the TO View Controller, I receive {{0, 0}, {0, 0}}
for both initial and final frame. I thought that method on the context is supposed to show the expected frame after the transition for final, and the initial frame before the transition.
Is this how it is supposed to work?
-(void)startInteractiveTransition:(id<UIViewControllerContextTransitioning>)transitionContext{
UIViewController *fromVC = [transitionContext viewControllerForKey:UITransitionContextFromViewControllerKey];
UIViewController *toVC = [transitionContext viewControllerForKey:UITransitionContextToViewControllerKey];
CGRect initialToFrame = [transitionContext initialFrameForViewController:toVC];
CGRect finalToFrame = [transitionContext finalFrameForViewController:toVC];
NSLog(@"initialToFrame: %@, finalToFrame: %@", NSStringFromCGRect(initialToFrame), NSStringFromCGRect(finalToFrame));
}
Debugger is showing:
initialToFrame: {{0, 0}, {0, 0}}, finalToFrame: {{0, 0}, {0, 0}}
Additionally, the Debugger is also showing the following warning. Does this contribute in anyway to the error?
Presenting view controllers on detached view controllers is discouraged