Hello,
I have a view controller container. When I transition from the first child view controller (a simple view controller) to the second one that has a tabbar and navigation bar, it appears that the initial position of the tabbar and the navigation bar are not the as expected, they are slightly outside the screen. See the GIF and the code. Do you know how can I avoid that strange animation? Or the root of the problem. Thanks.
dashboardCoordinator = DashboardCoordinator()
rootViewController.addChild(dashboardCoordinator!.rootViewController)
let fromVC = onboardingCoordinator!.rootViewController
let toVC = dashboardCoordinator!.rootViewController
fromVC.willMove(toParent: nil)
rootViewController.transition(from: fromVC,
to: toVC,
duration: 5,
options: .transitionCrossDissolve,
animations: nil,
completion: { [weak self] finished in
guard let self = self else { return }
fromVC.removeFromParent()
self.onboardingCoordinator = nil
toVC.didMove(toParent: self.rootViewController)
})
Animated GIF
https://i.stack.imgur.com/Qo5Mn.gif
Thanks a lot.