Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,18 @@ public class SystemUITabBarController<T: TabItem>: UITabBarController, UITabBarC
}
let hostingController = UIHostingController(rootView: rootView)
let tabItem = scene.tabItem
let uiTabItem =
if tabItem.isSearchRole {
UITabBarItem(tabBarSystemItem: .search, tag: tabItem.viewIndex())
} else {
UITabBarItem()
}
if UIDevice.current.userInterfaceIdiom == .pad {
let isPad = traitCollection.userInterfaceIdiom == .pad
let uiTabItem: UITabBarItem
if isPad, tabItem.isSearchRole {
uiTabItem = UITabBarItem(tabBarSystemItem: .search, tag: tabItem.viewIndex())
} else if #available(iOS 26, *), tabItem.isSearchRole {
uiTabItem = UITabBarItem(tabBarSystemItem: .search, tag: tabItem.viewIndex())
} else {
// A system search item's title can't be cleared on iOS < 26, so use a
// plain item there instead to actually hide the label.
uiTabItem = UITabBarItem()
}
if isPad {
uiTabItem.title = tabItem.title
} else if #unavailable(iOS 26) {
uiTabItem.title = nil
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ extension View {
.font(Font(font))
.lineHeight(.multiple(factor: lineHeightMultiple))
} else {
let extra = font.pointSize * lineHeightMultiple
let extra = font.pointSize * (lineHeightMultiple - 1)
let spacing = (extra * 0.5)
return
self
Expand Down
Loading