Merge pull request #841 from jinsu35/fix-issue-744
Fix bug - scrollToTop() should be called when current tab is selected
This commit is contained in:
commit
dd0025cdae
|
@ -490,7 +490,7 @@ extension MainTabBarController: UITabBarControllerDelegate {
|
|||
|
||||
// Assert index is as same as the tab rawValue. This check needs to be done `shouldSelect`
|
||||
// because the nav controller has already popped in `didSelect`.
|
||||
if currentTab.rawValue == tabBarController.selectedIndex,
|
||||
if currentTab.rawValue == viewController.tabBarItem.tag,
|
||||
let navigationController = viewController as? UINavigationController,
|
||||
navigationController.viewControllers.count == 1,
|
||||
let scrollViewContainer = navigationController.topViewController as? ScrollViewContainer {
|
||||
|
|
Loading…
Reference in New Issue