377 questions
2
votes
1
answer
40
views
How to use NavigationStack with path and multiple enum type destinations in SwiftUI
I want to use NavigationStack with a custom navigation path array supporting multiple destination types. For example:
enum A: Hashable { ... }
enum B: Hashable { ... }
NavigationStack(path: $...
0
votes
2
answers
112
views
How to Eliminate Form Padding in NavigationStack
I have a form being loaded inside a navigation stack and I'm showing an image and title in the first form section with the code below:
Form {
Section {
VStack {
Image("...
0
votes
0
answers
57
views
How can I use navigationDestination for cross linking in a NavigationSplitView
I am writing a Universal App for macOS, iOS 26 and want to do a two column layout with NavigationSplitView.
In the sidebar I have two NavigationLinks with a value of NavigationOption, which are used ...
1
vote
0
answers
103
views
How can I fix the broken layout with a ScrollView inside a TabView that is inside a NavigationStack in SwiftUI?
I'd like to achieve a layout similar to the one shown in the Apple Fitness app. When I insert a ScrollView into a TabView, everything works fine, but if I try to add a NavigationStack to wrap the ...
1
vote
1
answer
286
views
ToolbarItem flickers when switching between tabs in iOS 26
How can I avoid the flickering ToolbarItem when switching between tabs, while still keeping a dedicated NavigationStack for each Tab?
I have unsuccessfully tried:
Nesting the TabView inside another ...
0
votes
1
answer
130
views
SwiftUI NavigationStack swipe anywhere on screen to go back
So by default on ios you can swipe from the edge of the screen to go back, and this question shows how to keep that while disabling the back button:
Hide navigation bar without losing swipe back ...
-1
votes
1
answer
151
views
SwiftUI sheet unexpectedly dismisses and navigates back after editing bound data in nested NavigationStack
I'm working on a SwiftUI app to manage recipes. I present a list of recipes in RecipesListView, and when the user taps on one, I navigate to a RecipeDetailView. Inside that detail view, I allow the ...
0
votes
1
answer
55
views
SwiftUI Tab in navigation stack title
I'm targeting iOS18 and above, I'm trying to achieve this effect
The app displayed is Revolut, I want to create a similar effect but I can't seem to find a starting point I also need it to be in sync ...
2
votes
0
answers
141
views
`.navigationBarBackButtonHidden()` not working on iOS 18.4
Current situation
I've got a minimal reproducible example of DocumentGroup app using a NavigationSplitView with a DetailView. I want to completely remove the default Navigation Bar inside these views ...
0
votes
1
answer
99
views
SwiftUI Navigation Issue: Unable to Reset to Welcome Screen on Logout with Nested NavigationLinks
I'm building a SwiftUI app with Firebase Authentication and experiencing navigation issues when users log out. My app has the following structure:
A root view in App.swift that conditionally shows:
...
0
votes
1
answer
92
views
NavigationLink in swiftui and routing
first of all thanks for attention and your help, so...
in my app I have router from where I log and logout user
@main
struct JobMatchApp: App {
@StateObject private var vm = RouterViewModel()
...
4
votes
1
answer
309
views
Hiding new tab view in iOS 18 when pushing screens
With iOS 18 Apple decided to move our beloved bottom tab bar controller to the top of the screen (apparently thats more modern). I am having the following situation: I have TabView where we have root ...
0
votes
0
answers
43
views
Auto-Collapsing navigationTitle when using TabView w/ shared toolbar?
Suppose I have a TabView which is the root of my app. I need to be able to tab between each of these, but some of them have their own NavigationStack Every one of them has a List associated with them, ...
0
votes
3
answers
195
views
show fullscreen view with overlay in SwiftUI?
I have 2 views:
import SwiftUI
struct SwiftUIView: View {
var body: some View {
NavigationStack {
... //show SwiftUIView2
}
.toolbar {
...
}...
1
vote
1
answer
81
views
How to make NavigationLink rows clear?
I am trying to make NavigationLink rows transparent in a List while using SwiftUIIntrospect to make the NavigationStack background clear. However, I am encountering an issue where the solution does ...
0
votes
1
answer
304
views
Is there any advantage of using NavigationStack when working with .sheet or .fullScreenCover navigation?
After working with UIKit for several years I am still quite new to SwiftUI and especially to its navigation features.
Currently I am trying to get my head around NavigationStack and ....
0
votes
1
answer
41
views
Back button misalignment in NavigationView/NavigationStack within a sheet after orientation change
I observed this issue and added feedback to the Apple Feedback Assistant. However, here is the problem:
When switching from portrait to landscape format and back, the back button in the navigation ...
0
votes
1
answer
430
views
Navigation Issue in iOS 18: Duplication of Navigation Trigger When Using @Environment(\.dismiss) in SwiftUI
I’m encountering an issue with SwiftUI navigation in iOS 18, where navigating to a DetailView causes unexpected duplication of navigation behavior when @Environment(.dismiss) is used.
Code Example:
...
0
votes
1
answer
71
views
Passing @FocusState through Navigation
This is an interesting scenario. While I'm not going to get into designing the viewHandler, assume a parent view has NavigationStack setup where you can append to the navigationPath variable.
Let's ...
1
vote
0
answers
51
views
Routing in NavigationStack not working as expected
I have a full code example below. The problem is that when I tap "Go to Detail" in the DogsView, the detail view is not visually pushed, although the path does get added to the path array ...
0
votes
0
answers
63
views
Confused By NavigationStack Message and Navigation Behavior
I am getting a lot of odd behavior with NavigationStacks and NavigationSplitView and am unclear why.
There are several things going on, different depending on portrait or landscape.
The sample app has ...
1
vote
1
answer
27
views
Fail to show bio in DetailView while using NavigationStack in SwiftUI
I am learning iOS development using SwiftUI. I pass my user to DetailView using NavigationStack :
let shape = RoundedRectangle(cornerRadius: Constants.cornerRadius)
NavigationStack {
...
3
votes
1
answer
229
views
Difference Between navigationBarTitle and toolbarTitle in SwiftUI
What is the difference between ①navigationBarTitleDisplayMode and ②toolbarTitleDisplayMode when using them with SwiftUI’s navigationTitle?
It appears that .inlineLarge only works with the latter (②), ...
3
votes
1
answer
848
views
Issue with Margin During Navigation Transition in iOS 18
The new .navigationTransition feature introduced in SwiftUI for iOS 18+ offers an impressive animated screen transition. However, during the transition, the parent view shrinks, leaving a white margin ...
-1
votes
1
answer
486
views
Different navigationBarTitleDisplayMode behaviour between iOS 17 and iOS 18
I have this bottom sheet in my app I'm building for a tutorial (100 days of Swift UI), and I noticed that the exact same code for showing a bottom sheet with a title has different effects on iOS18 vs ...