diff --git a/Mastodon/Scene/Root/MainTab/MainTabBarController.swift b/Mastodon/Scene/Root/MainTab/MainTabBarController.swift index 0aeed3e37..da508d452 100644 --- a/Mastodon/Scene/Root/MainTab/MainTabBarController.swift +++ b/Mastodon/Scene/Root/MainTab/MainTabBarController.swift @@ -26,6 +26,8 @@ class MainTabBarController: UITabBarController { var authContext: AuthContext? + private let largeContentViewerInteraction = UILargeContentViewerInteraction() + let composeButttonShadowBackgroundContainer = ShadowBackgroundContainer() let composeButton: UIButton = { let button = UIButton() @@ -180,6 +182,8 @@ class MainTabBarController: UITabBarController { self.coordinator = coordinator self.authContext = authContext super.init(nibName: nil, bundle: nil) + tabBar.addInteraction(largeContentViewerInteraction) + } required init?(coder: NSCoder) { @@ -349,6 +353,7 @@ extension MainTabBarController { let tabBarLongPressGestureRecognizer = UILongPressGestureRecognizer() tabBarLongPressGestureRecognizer.addTarget(self, action: #selector(MainTabBarController.tabBarLongPressGestureRecognizerHandler(_:))) + tabBarLongPressGestureRecognizer.delegate = self tabBar.addGestureRecognizer(tabBarLongPressGestureRecognizer) // todo: reconsider the "double tap to change account" feature -> https://github.com/mastodon/mastodon-ios/issues/628 @@ -844,3 +849,9 @@ extension MainTabBarController { } } + +extension MainTabBarController: UIGestureRecognizerDelegate { + func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldRecognizeSimultaneouslyWith otherGestureRecognizer: UIGestureRecognizer) -> Bool { + true + } +}