Skip to content
New issue

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

re-tap selected item freezes TabBar #67

Open
Lennon1216 opened this issue Jul 10, 2020 · 2 comments
Open

re-tap selected item freezes TabBar #67

Lennon1216 opened this issue Jul 10, 2020 · 2 comments

Comments

@Lennon1216
Copy link

If you tap on the already selected item again, the whole tabbar freezes can't select anything afterwards.

@onl1ner
Copy link

onl1ner commented Aug 9, 2020

This line is freezing TabBar. You could comment it because seems it has no sense. Function didSelectItem(_:) is already disabling user interaction so there is no point to disable the interaction for each TabBarItem.

tabBarItem.addTarget(self, action: #selector(disableAllButtonsBut(_:)), for: .touchDown)

@starkdmi
Copy link

Solved by adding (version 2.0.2 used)
tabBarItem.addTarget(self, action: #selector(enableAllButtons), for: .touchUpInside)
into BATabBarController/BATabBarController/Classes/BATabBar.swift, just after the line
tabBarItem.addTarget(self, action: #selector(disableAllButtonsBut(_:)), for: .touchDown)

Function enableAllButtons() should be marked as @objc func..

Comment by @onl1ner solved this, but pressing down on multiple tab items at once will bring you to a new issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants