We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi there! In #4 you show how to use coordinators with tabBarController. But what if I want to go back from tabBarController? My code:
` class TabCoordinator: BaseCoordinator {
let startNavigationController: UINavigationController init(navigationController: UINavigationController) { self.startNavigationController = navigationController self.startNavigationController.navigationBar.isHidden = true } override func start()-> Observable<Void> { let rootTabBarController = TabBarViewController.initFromStoryboard(name: "Main") let viewControllers = initControllers() let homeCoordinator = HomeCoordinator(rootViewController: viewControllers[0]) coordinate(to: COHomeCoordinator) .subscribe() .disposed(by: disposeBag) let profileCoordinator = ProfileCoordinator(rootViewController: viewControllers[1]) coordinate(to: profileCoordinator) .subscribe() .disposed(by: disposeBag) let logout = HomeCoordinator.logoutUser! /* In HomeCoordinator I have let logoutUser: PublishSubject<Void>! that bind to logout button. */ rootTabBarController.viewControllers = viewControllers rootTabBarController.tabBar.isTranslucent = false startNavigationController.pushViewController(rootTabBarController, animated: true) return logout.do(onNext: {[weak self] _ in self?.startNavigationController.popViewController(animated: true) }) } private func initControllers()->[UINavigationController]{ let homeVC = UINavigationController() homeVC.tabBarItem = UITabBarItem(title: "Home", image: nil, selectedImage: nil) let profileVC = UINavigationController() profileVC.tabBarItem = UITabBarItem(title: "Profile", image: nil, selectedImage: nil) return [homeVC, profileVC] } }
`
The problem is that I have growing memory when login-loguot few times. I have tried set coordinators to nil in return block, but it does not work.
The text was updated successfully, but these errors were encountered:
Did you try removing coordinators from ChildCoordinator Array? Were you able to fix that memory leak issue? @MIP9
Sorry, something went wrong.
No branches or pull requests
Hi there!
In #4 you show how to use coordinators with tabBarController. But what if I want to go back from tabBarController? My code:
`
class TabCoordinator: BaseCoordinator {
`
The problem is that I have growing memory when login-loguot few times. I have tried set coordinators to nil in return block, but it does not work.
The text was updated successfully, but these errors were encountered: