Post

Replies

Boosts

Views

Activity

Xcode 15 beta 5 / Watch OS 10 beta: .navigationBarBackButtonHidden(true) doesn't work with .sheet
Currently, I am adapting my app to watchOS 10 and the new navigation options. However, I want to keep the page call via PresentationAdaption .sheet, but using .navigationBarBackButtonHidden(true). In Xcode 14 and under watchOS 9 this has not been a problem so far, but in the new version the back button, newly introduced in watch OS 10, still appears. Is this a bug or a feature? And how do I get rid of this button? Circle() .onTapGesture { justDoIt = true } .sheet(isPresented: $justDoIt) { View() } .navigationBarBackButtonHidden(true)
0
0
474
Aug ’23
.tabBarMinimizeBehavior(.onScrollDown) not triggering in tabs that use NavigationStack(path:) (iOS 26 / Xcode 26 beta 7)
Environment iOS 26.0 (device), Xcode 26 beta 7 SwiftUI TabView using the new Tab("…", value:) API iPhone only (aware that minimize is iPhone-only) Issue .tabBarMinimizeBehavior(.onScrollDown) only works reliably in my Settings tab. In my other tabs (Dashboard / Games / Help), the tab bar does not minimize when scrolling, even though the content is scrollable. The main difference: those tabs are wrapped in a NavigationStack(path:) with a bound NavigationPath. Settings has no path binding. Repro (minimal) import SwiftUI enum TabSel: Hashable { case dashboard, games, settings } struct Root: View { @State private var selection: TabSel = .dashboard // Per-tab paths @State private var dashPath = NavigationPath() @State private var gamesPath = NavigationPath() var body: some View { if #available(iOS 26, *) { TabView(selection: $selection) { // ❌ Does NOT minimize when scrolling SwiftUI.Tab("Dashboard", systemImage: "square.grid.2x2.fill", value: .dashboard) { NavigationStack(path: $dashPath) { ScrollView { // ... } } } // ❌ Same here SwiftUI.Tab("Games", systemImage: "sportscourt.fill", value: .games) { NavigationStack(path: $gamesPath) { ScrollView { // ... } } } // ✅ Minimizes as expected on scroll SwiftUI.Tab("Settings", systemImage: "gear", value: .settings) { // Note: also inside a NavigationStack, but no `path` binding NavigationStack { ScrollView { // ... } } } } .tabBarMinimizeBehavior(.onScrollDown) } } } What I tried Removing nested stacks in child views → no change Ensured no .tabViewStyle(.page) / PageTabViewStyle() anywhere No toolbar(.hidden, for: .tabBar) on the tab roots Confirmed the content is scrollable and tested on device Expected All tabs should minimize the tab bar on downward scroll. Actual Only the Settings tab (no path binding) minimizes; tabs with NavigationStack(path:) do not. Questions Is this a known issue with NavigationStack(path:) and .tabBarMinimizeBehavior in iOS 26 betas? Any recommended workaround that keeps a bound NavigationPath per tab?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
1
1
146
4d