Skip to content

SwiftUI: safeAreaInset/safeAreaBar modifier used on a NavigationStack should automatically update the content inset (margins) of Views in the NavigationStack #824

Description

@alpennec

Submission Date

2026-07-14

Status

Open

Area

SwiftUI

Operating System Version

iOS 26

Type

Incorrect/Unexpected Behavior

Description

Hello,

In my app, I want a content to be always visible at the bottom of the UI such as a button or a mini player (Apple Music or Apple Podcasts).
It should be visible even if I navigate to a destination view (using a NavigationLink or updating the NavigationStack path).

If I use the safeAreaInset/safeAreaBar modifier on the NavigationStack in SwiftUI, the content insets (margins) is not automatically updated for the Views within the stack.

Expected behaviour: if I use the safeAreaInset/safeAreaBar, the Views in the NavigationStack should have their content inset (margins) updated like if the safeAreaInset/safeAreaBar is applied on the NavigationStack content directly.

Steps to reproduce: check the attached project, scroll at the bottom of the first List, notice the content is hidden below the button. Navigate to the detail view, scroll at the bottom and notice the content is hidden below the button.

Regards

import SwiftUI

struct NavigationStackSafeAreaInset: View {
    var body: some View {
        NavigationStack {
            List {
                ForEach(0...20, id: \.self) { int in
                    NavigationLink {
                        List {
                            ForEach(0...20, id: \.self) { int in
                                Text(int.formatted())
                            }
                        }
                    } label: {
                        Text(int.formatted())
                    }
                }
            }
        }
        .safeAreaInset(edge: .bottom) {
            Button { } label: {
                Text("New")
                    .frame(maxWidth: .infinity)
            }
            .buttonStyle(.borderedProminent)
            .controlSize(.large)
            .buttonBorderShape(.capsule)
            .padding()
        }
    }
}

#Preview {
    NavigationStackSafeAreaInset()
}

Keywords

No response

Prerequisites

  • The title follows the format FB<number>: <title>
  • I will keep this issue updated with Apple's responses

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions