Show icons only in SwiftUI swipe actions on iOS 26
When declaring a simple button in SwiftUI, we usually provide a title and an image name, and rely on SwiftUI to adapt its display based on the context the button is used in. This adaptable behavior has changed for buttons in swipe actions on iOS 26.
Previously, a button with a title and a symbol would only display the symbol when placed inside a swipe action.
RecipeRow(recipe: recipe)
.swipeActions {
Button(
"Delete", systemImage: "trash",
role: .destructive
) {
delete(recipe: recipe)
}
}

On iOS 26, however, the same button includes both the title and the symbol either stacked vertically, if the row height allows it, or placed side by side.

This new behavior can be useful for actions that don't have obvious icons to depict them, but it may be overkill for something simple like "Delete", where the trash icon by itself is clear enough.
To return to the previous button look in swipe actions and show only the icons, we can apply the labelStyle()
modifier to the button and pass in the iconOnly
option.
RecipeRow(recipe: recipe)
.swipeActions {
Button(
"Delete", systemImage: "trash",
role: .destructive
) {
delete(recipe: recipe)
}
.labelStyle(.iconOnly)
}

This works because a SwiftUI button constructed with a title and an image uses a label under the hood, so setting an explicit label style in the environment makes it adjust its appearance based on the provided style, rather than follow an automatic behavior that comes from SwiftUI's internal logic.
If you are looking to build a strong foundation in SwiftUI, make sure to check out my book: SwiftUI Fundamentals. It takes a deep dive into the framework's core principles and APIs to help you understand how it works under the hood and how to use it effectively in your projects.
For more resources on Swift and SwiftUI, take a look at my other books and book bundles.