Fix tab bar hit box

This commit is contained in:
Isaac
2025-10-21 21:06:20 +04:00
parent fad4203892
commit 39db75b4ea

View File

@@ -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
}
}