From 39db75b4eac5666f7bb34b44c83a9895bb909af6 Mon Sep 17 00:00:00 2001 From: Isaac <> Date: Tue, 21 Oct 2025 21:06:20 +0400 Subject: [PATCH] Fix tab bar hit box --- .../TabBarComponent/Sources/TabBarComponent.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/submodules/TelegramUI/Components/TabBarComponent/Sources/TabBarComponent.swift b/submodules/TelegramUI/Components/TabBarComponent/Sources/TabBarComponent.swift index 5bcbc34335..6f9276d4d6 100644 --- a/submodules/TelegramUI/Components/TabBarComponent/Sources/TabBarComponent.swift +++ b/submodules/TelegramUI/Components/TabBarComponent/Sources/TabBarComponent.swift @@ -372,7 +372,6 @@ public final class TabBarComponent: Component { let items: [UITabBarItem] = (0 ..< component.items.count).map { i in return UITabBarItem(title: component.items[i].item.title, image: nil, tag: i) } - //items.append(UITabBarItem(tabBarSystemItem: .search, tag: 100)) nativeTabBar.items = items for (_, itemView) in self.itemViews { itemView.view?.removeFromSuperview() @@ -545,11 +544,12 @@ public final class TabBarComponent: Component { transition.setFrame(view: self.backgroundView, frame: CGRect(origin: CGPoint(), size: size)) self.backgroundView.update(size: size, cornerRadius: size.height * 0.5, isDark: component.theme.overallDarkAppearance, tintColor: .init(kind: .panel, color: component.theme.chat.inputPanel.inputBackgroundColor.withMultipliedAlpha(0.7)), transition: transition) - transition.setFrame(view: self.contextGestureContainerView, frame: CGRect(origin: CGPoint(), size: size)) - if self.nativeTabBar != nil { - return CGSize(width: availableSize.width, height: 62.0) + let finalSize = CGSize(width: availableSize.width, height: 62.0) + transition.setFrame(view: self.contextGestureContainerView, frame: CGRect(origin: CGPoint(), size: finalSize)) + return finalSize } else { + transition.setFrame(view: self.contextGestureContainerView, frame: CGRect(origin: CGPoint(), size: size)) return size } }