[Coordinator]() var navigationController: UINavigationController // ... init method func goToWelcomePage() { let welcomePageVC = WelcomePageViewController() welcomePageVC.coordinator = self guard var destinationDS = welcomePageVC.router?.dataStore else { return } guard let usecaseProvider = usecaseProvider else { return } passDataToWelcomePage(usecaseProvider: usecaseProvider, sourceVC: sourceVC, destination: &destinationDS) navigationController.pushViewController(welcomePageVC, animated: true) } private func passDataToWelcomePage(usecaseProvider: OAPUseCaseProvider, sourceVC: UIViewController?, destination: inout WelcomeDataStore) { destination.usecaseProvider = usecaseProvider if let sourceVC = sourceVC, let nav = sourceVC.navigationController { destination.isNavigationBarHidden = nav.isNavigationBarHidden } } }