This repository has been archived by the owner on Sep 26, 2022. It is now read-only.
This repository has been archived by the owner on Sep 26, 2022. It is now read-only.
Storyboard, load view in the selected item tab bar #8
Open
Description
there is an issue happened with this scenario
1- select item 0 and then from presented view controller(for example it is list) navigate to another view controller (details x for example)
2- select tab bar item 1
3- return back to tab bar item 0 (will present details x) not the main view controller for tab bar item 0
this code to solve this issue , in PTCardTabBarController
extension PTCardTabBarController: CardTabBarDelegate {
func cardTabBar(_ sender: PTCardTabBar, didSelectItemAt index: Int) {
self.selectedIndex = index
// this code added by me to solve this issue
let nav = self.selectedViewController as! UINavigationController
nav.popToRootViewController(animated: false)
// end my code
}
}
Metadata
Assignees
Labels
No labels