Created
May 5, 2021 09:47
-
-
Save AmrAbedal/1bd20b5b679a126bfb666307acbe4e56 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CreatePostCardCoordinator { | |
private let presentingViewController: UIViewController | |
lazy var tabBarController: UITabBarController = { | |
let viewModel = CreatePostCardViewModel.init(coordinator: self) | |
let tabBarController = CreatePostCardTabBarViewController.init(viewModel: viewModel) | |
return tabBarController | |
}() | |
init(presentingViewController: UIViewController) { | |
self.presentingViewController = presentingViewController | |
} | |
func start() { | |
self.presentingViewController.present(tabBarController, animated: true, completion: nil) | |
} | |
func setupTapBar(delegate: CreatePostCardDelegate) { | |
PostCardStyleCoordinator.init(tabBarController: tabBarController, delegate: delegate).start() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment