1

Updating apps for iOS 26. Noticed that the toolbar (bottom placement) is laid out behind the tab bar in iPhone. So, in portrait mode you can't see the toolbar buttons. enter image description here

You can see them in landscape mode because there's more space and the tabs are in the center. iPhoneLandscape

Same app running on iPadOS26 works fine works when the app is dragged to a compact horizontal size. You see the toolbar above the tabbar. iPadCompact

Tested on device and simulators. How can I get my toolbars to show in iPhone above the tabbar?

The code below was used to generate the screenshots.

import SwiftUI

@main
struct ThreeTabsApp: App {
  var body: some Scene {
    WindowGroup {
      RootTabsView()
    }
  }
}

struct RootTabsView: View {
  var body: some View {
    TabView {
      TabScreen(title: "Home")
        .tabItem { Label("Home", systemImage: "house") }

      TabScreen(title: "Search")
        .tabItem { Label("Search", systemImage: "magnifyingglass") }

      TabScreen(title: "Profile")
        .tabItem { Label("Profile", systemImage: "person.crop.circle") }
      
      TabScreen(title: "Folder")
        .tabItem { Label("Folder", systemImage: "folder.badge.person.crop") }

      TabScreen(title: "Walking")
        .tabItem { Label("Walking", systemImage: "figure.walk") }

      TabScreen(title: "Sun")
        .tabItem { Label("Sun", systemImage: "sun.min.fill") }
    }
  }
}

/// A reusable screen for each tab that provides its own bottom toolbar.
struct TabScreen: View {
  let title: String
  @State private var counter = 0

  var body: some View {
    NavigationStack {
      VStack(spacing: 16) {
        Text(title)
          .font(.largeTitle.bold())

        Text("Counter: \(counter)")
          .font(.title3.monospacedDigit())

        Text("Use the bottom toolbar buttons to change the counter.")
          .foregroundStyle(.secondary)
      }
      .padding()
      .navigationTitle(title)
      .toolbar {
        ToolbarItemGroup(placement: .bottomBar) {
          Button {
            counter = max(0, counter - 1)
            print("[\(title)] Prev tapped")
          } label: {
            Label("Prev", systemImage: "chevron.left")
          }

          Spacer(minLength: 24)

          Button {
            counter += 1
            print("[\(title)] Next tapped")
          } label: {
            Label("Next", systemImage: "chevron.right")
          }
        }
      }
    }
  }
}

1 Answer 1

1

The toolbar is shown above the tab bar when the .toolbar modifier is attached to the NavigationStack in TabScreen:

// TabScreen

var body: some View {
    NavigationStack {
        VStack(spacing: 16) {
            // content as before
        }
        .padding()
        .navigationTitle(title)
    }
    .toolbar { // 👈 .toolbar moved to here
        ToolbarItemGroup(placement: .bottomBar) {
            // content as before
        }
    }
}

Screenshot

Sign up to request clarification or add additional context in comments.

6 Comments

Ps. see this comment for some background to the downvote.
Right answer @benzy-neez
I have accepted the answer as this does work for both iOS 26 and 18 using the sample code provided. My real use case is a bit more complicated with UIKit views, and SwiftUI using UiHostingController. In my real app the toolbar shows fine in iOS 26 but is hidden in iOS 18 in the SwiftUI views. Opposite problem with UIKit views: shows in 18 but hidden in 26. Any suggestions?
If you can get it to work by applying .toolbar to different parent views then you could use a ViewModifier to apply the modifier conditionally. Inside the modifier you would include an iOS version check: if #available(iOS 26.0, *) { ... } else { ... }. Ps, thanks for accepting the answer!
Yes. If I can't figure out a root cause then I'll end up doing that for SwiftUI. Different issue for UIKit.
By the way, no such problems with earlier versions of Xcode.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.