From 56b51f944d61f1431d29e360a011022be2621261 Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Mon, 14 Dec 2020 22:16:16 -0500 Subject: [PATCH] Add drag and drop spring loading to tab bar & sidebar --- Tusker/Screens/Main/MainSidebarViewController.swift | 1 + Tusker/Screens/Main/MainTabBarViewController.swift | 2 ++ 2 files changed, 3 insertions(+) diff --git a/Tusker/Screens/Main/MainSidebarViewController.swift b/Tusker/Screens/Main/MainSidebarViewController.swift index db751304..cdb0980f 100644 --- a/Tusker/Screens/Main/MainSidebarViewController.swift +++ b/Tusker/Screens/Main/MainSidebarViewController.swift @@ -81,6 +81,7 @@ class MainSidebarViewController: UIViewController { collectionView.backgroundColor = .clear collectionView.delegate = self collectionView.dragDelegate = self + collectionView.isSpringLoaded = true view.addSubview(collectionView) dataSource = createDataSource() diff --git a/Tusker/Screens/Main/MainTabBarViewController.swift b/Tusker/Screens/Main/MainTabBarViewController.swift index 7aea1fd3..601c3c77 100644 --- a/Tusker/Screens/Main/MainTabBarViewController.swift +++ b/Tusker/Screens/Main/MainTabBarViewController.swift @@ -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) {