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)
        }
    }
iPhone screen showing a list with a row swiped to the left to reveal the delete action displaying a trash symbol


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.

Two iPhone screens showing a delete swipe action: one with icon and title stacked vertically and one horizontally


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)
    }
iPhone screen showing a list with a row swiped to the left to reveal the delete action displaying a trash symbol


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.

SwiftUI Fundamentals by Natalia Panferova book coverSwiftUI Fundamentals by Natalia Panferova book cover

Deepen your understanding of SwiftUI!$35

The essential guide to SwiftUI core concepts and APIs

SwiftUI Fundamentalsby Natalia Panferova

  • Explore the key APIs and design patterns that form the foundation of SwiftUI
  • Develop a deep, practical understanding of how SwiftUI works under the hood
  • Learn from a former Apple engineer who worked on widely used SwiftUI APIs

Deepen your understanding of SwiftUI!

The essential guide to SwiftUI core concepts and APIs

SwiftUI Fundamentals by Natalia Panferova book coverSwiftUI Fundamentals by Natalia Panferova book cover

SwiftUI Fundamentals

by Natalia Panferova

$35