Add drag and drop spring loading to tab bar & sidebar

This commit is contained in:
Shadowfacts 2020-12-14 22:16:16 -05:00
parent 30297c2390
commit 56b51f944d
2 changed files with 3 additions and 0 deletions

View File

@ -81,6 +81,7 @@ class MainSidebarViewController: UIViewController {
collectionView.backgroundColor = .clear
collectionView.delegate = self
collectionView.dragDelegate = self
collectionView.isSpringLoaded = true
view.addSubview(collectionView)
dataSource = createDataSource()

View File

@ -70,6 +70,8 @@ class MainTabBarViewController: UITabBarController, UITabBarControllerDelegate {
let tapRecognizer = UITapGestureRecognizer(target: self, action: #selector(tabBarTapped))
tapRecognizer.cancelsTouchesInView = false
tabBar.addGestureRecognizer(tapRecognizer)
tabBar.isSpringLoaded = true
}
@objc private func tabBarTapped(_ recognizer: UITapGestureRecognizer) {