Apparently now with iOS 26.1 if you have .tabViewBottomAccessory { } you get a pill shape floater all the time. That was not like that in 26.0.
iOS 26.1 and tabViewBottomAccessory
Tab bars accessory views stay visible across your app, this was introduced in iOS 26.0. Please review Get to know the new design system to explore the new design system and key changes
I've seen this as well. In 26.0, providing a conditional statement around the contents would hide the bottom accessory view, now it is shown constantly.
From this thread:
You'll want to use the new api
tabViewBottomAccessory(isEnabled:content:), which allows you dynamically show and hide the view instead of anEmptyView.When
isEnabledistrue, the accessory view is shown, and whenisEnabledisfalse, the view is hidden.
Does that help?
And if you hide the tab bar it doesn't hide the accessory!!!
Okay, so in the meantime you could use something like this:
public struct Conditional<Content> {
public let content: Content
public init(_ content: Content) {
self.content = content
}
}
extension View {
var conditional: Conditional<Self> { Conditional(self) }
}
@ViewBuilder func showAccessory(_ enabled: Bool, accessoryContent: View) -> some View {
if(enabled) {
if #available(iOS 26.2, *) {
content
.tabViewBottomAccessory(isEnabled: enabled) {
accessoryContent
}
} else {
if #available(iOS 26.0, *) {
content
.tabViewBottomAccessory() {
accessoryContent
}
} else {
content
}
}
} else {
content
}
}
// Use it like this:
...
MyView {
}
.conditional.showAccessory(true /*or false*/, accessoryContent: MyAccessoryView())
Caveat: I have not tried this.