When upgrading an app from iOS 18 to iOS 26,
some labels in a toolbar menu get wrapped unexpectedly.
The issue can be reproduced through the sample below,
which contains this label : "Envoyer une réaction"
On iPhone with iOS 18, the label is displayed on 1 line.
But on iPhone with iOS 26, the label is displayed on 2 lines.
No improvement was obtained through these modifiers :
.lineLimit, .frame and .fixedSize
.
.
How to avoid this unnecessary label wrapping that disrupts the readability ?
.
.
import SwiftUI
struct SampleView: View {
var body: some View {
NavigationStack {
Color.clear
.toolbar {
ToolbarItem {
Menu {
Button(action: {}) {
Label("Envoyer une réaction", systemImage: "envelope")
}
} label: {
Image(systemName: "ellipsis")
}
}
}
}
}
}
#Preview {
SampleView()
}
Hello @1066,
Thank you for your post.
In iOS 26, this is controlled by the system, however, in the 27 releases, SwiftUI introduces new toolbar APIs to control how these items are displayed as your app resizes.
- Use visibilityPriority modifier to keep important groups of toolbar items visible.
- Use toolbarOverflowMenu to permanently place lower priority toolbar items into the overflow menu.
- User topBarPinnedTrailing to pin needed toolbar items to the trailing edge at all times.
Check out the WWDC26 What’s new in SwiftUI session for more new updates which might relevant to your project.
Travis