1,161 questions
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 ...
0
votes
1
answer
421
views
How to hide `TabViewBottomAccessory` when drilling down?
I would like to conditionally render TabViewBottomAccessory because I don't want to show it when I am drilling down. When going to the child view I want to hide both tab view (which I achieved by ....
1
vote
3
answers
94
views
Multiple NavigationLinks in a List Trigger Simultaneously – How to Fix?
In SwiftUI, when I place multiple NavigationLink views directly inside a HStack, then put this HStack inside a List, clicking one link triggers all NavigationLink views, causing unexpected navigation ...
2
votes
1
answer
136
views
Why does NavigationLink break my NavigationSplitView
Below I have created a simple NavigationSplitView for MacOS using Swift. Both the sidebar and the detail page rely on an Observable value. When I switch that observable value both sidebar and detail ...
0
votes
0
answers
23
views
How to remove NavigationLink arrow (chevron?)? [duplicate]
I want to remove (or hide) the navigation arrow (chevron) but failing miserably. Could you please support me?
HStack(alignment: .center) {
NavigationLink {
VerseView(initialRow: row)
...
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
47
views
Automatically "Back" action after List item selection in NavigationLink
I have some screen in iOS app with NavigationStack (or NavigationView) which contains different elements. One of them is searchable List which is wrapped in NavigationLink. So this searchable list ...
0
votes
1
answer
111
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
98
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()
...
0
votes
0
answers
103
views
SwiftUI PhotosPicker Only Responds to Long Press
SwiftUI beginner here.
I’m encountering an issue with SwiftUI’s PhotosPicker: a normal tap on the PhotosPicker rarely triggers the picker UI, while a long press eventually works. The PhotosPicker is ...
1
vote
1
answer
87
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
2
answers
155
views
Why does FocusState break when a view is pushed on the NavigationStack?
I have a view called TitleList that allows the user to edit the title of a row using a .swipeAction (it will replace the NavigationLink with a TextField).
While a title is being edited, if a user taps ...
1
vote
1
answer
82
views
is it possible to get NavigationSplitView to work on iPhone when not on root view?
I have an app that utilizes NavigationSplitView on the next view that gets pushed onto the root view's NavigationStack (I don't like using a three column layout and prefer to have an entire screen for ...
1
vote
0
answers
8
views
I am not using NavigationLink and .navigationDestination correctly
I am adding an EventList to my app of CardViews but the List is not working properly. The button to access the list is at the bottom of my stack. when selected the EventList appears but selecting the ...
0
votes
1
answer
89
views
SwiftUI - Image in NavigationLink clipped when adding cornerRadius
I'm working on a SwiftUI app for tvOS. I have a NavigationLink with an image and a line of text. The item works as expected, when in focus it grows. However, if I change the corner radius (the default ...
0
votes
1
answer
50
views
Navigation in SwiftUI button for tvOS disables animation
I'm working on creating a tvOS app in SwiftUI for the first time. I'm pretty new at this.
I have a row of buttons, which works properly. Whenever I change focus the item in focus increases in size.
...
0
votes
1
answer
433
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:
...
1
vote
0
answers
122
views
toolbar(.hidden) not working when navigate while searching is active
Well Im just creating a personal project and then I face this bug. My navigation looks like this, if you compile the code and then try to navigate while you are not searching the .toolbar(.hidden) is ...
0
votes
0
answers
114
views
NavigationLink not redirecting to destination when NavigationSplitView is not the root view in SwiftUI
I have the following SwiftUI code, where everything works correctly when NavigationRoutes is the root view:
struct NavigationRoutes: View {
@State private var currentSelection: Destinations?
...
3
votes
0
answers
115
views
How to Maintain Background Color Consistency During ZoomTransitions in SwiftUI?
I’m currently working on a SwiftUI project and trying to implement a transition effect similar to ZoomTransitions. However, I’ve run into an issue.
When transitioning from Page A to Page B using ....
0
votes
0
answers
64
views
Why does NavigationView navigates back to root if item in master was selected?
The master of the NavigationView navigates back to root, if a item was selected. But only if previously a item in the root list was selected.
Tested on iPadOS.
Steps to reproduce:
Select a item in ...
-1
votes
1
answer
99
views
NavigationLink detail view transition only animates once
Problem:
Detail view transition only animates the first time
Workaround:
Make the LazyVStack a VStack. But this is not desirable.
Code:
struct TestView: View {
var body: some View {
...
0
votes
1
answer
277
views
SwiftUI Navigation Link Arrow/Chevron modify position
I'm trying to recreate the messages app from Apple, I noticed that their chevron on the chat selection is at the top and not the center like how navigationLink gives by default.
Here is an image of ...
2
votes
2
answers
53
views
Using a single member of an array in both a bound and unbound way in ForEach in SwiftUI without using indices
Apologies because I'm new to SwiftUI -
I have a class (Meal) that contains an array of objects of another class (Food). What I'm trying to achieve here is to be able to add foods and have that update ...
0
votes
0
answers
18
views
NavigationDestination "in" variable as Binding in destination view not possible, why?
I did some searching but didn't understand the answer and I hope, I can ask the question again and get some help to find a solution.
I have a LazyVGrid with a NavigationLink inside and I would like to ...
0
votes
1
answer
123
views
SwiftUI: Navigate to a new list item immediately after adding it
I'm building a SwiftUI app where I have a list of notes. I want to add a new note to the list when a button is clicked and immediately navigate to the detail view of that new note, similar to what ...
0
votes
0
answers
49
views
Dismiss keyboard and submit text in TextField when NavigationLink tapped
I have a List containing a TextField and a couple of NavigationLink items. When I tap into the TextField, the keyboard appears and I can enter a text. I would like to hide the keyboard and submit the ...
0
votes
0
answers
34
views
swiftui full swipe navigation feature does not work with multiple navigation in a row
I created a view in Swiftui to add full swipe navigation feature and in this view full swipe feature works only on the first navigation screen. when there are multiple navigations in a row, full swipe ...
0
votes
1
answer
192
views
SwiftUI NavigationLink goes back immediately on first activation after app launch
I am experiencing an issue with programmatic navigation in my SwiftUI app. I use a NavigationLink with an isActive binding to navigate to a specific view (EditUser). The first time I toggle the ...
1
vote
1
answer
122
views
NavigationLink not working with custom detail view
The boiler plate code for a Multiplatform app on Xcode 16.1 (macOS 15.1) with SwiftUI and SwiftData, has a NavigationSplitView containing a List of NavigationLinks. When the NavigationLink contents ...
1
vote
1
answer
42
views
How to make a custom cell/row menu clickable (3 dots at top right) in a List with NavigationLink
I am trying to show popover when user click on custom cell/row menu in List. But every time the cell get the action and navigating to inside the details screen. Here is my code snippet. Also attached ...
1
vote
0
answers
53
views
Disable dragging down in Hero animations with NavigationTransitions
I'm using a hero transition and I can't find a way to disable the dragging down dismiss behavior in the second view.
I only want to dismiss the view using a button.
struct HomeView: View {
var ...
0
votes
0
answers
41
views
Pass data to next view using Binding<T?>
I need some help from my colleagues because I can't handle it on my own. I am stuck.
I have a database on Firebase with training programs in it. ProgramsID loads the list of trainings. Here's how the ...
0
votes
0
answers
177
views
Back chevron's color, and alternate text for "Back", when using SwiftUI and UIKit mix using hostingController
I tried everything, but I couldn't change the color of the chevron here. I have a UIKit ViewController which in turn is instantiating a SwiftUI view, which in turn creates and displays 3 other SwiftUI ...
0
votes
1
answer
130
views
Swifui button image is stretching across the entire streen
I am not sure how to get the image to stay in a reasonable size, being new to SwiftUI I have no doubt that this is completely my fault.
The code is as follows:
import SwiftUI
struct AnimalsView: ...
0
votes
1
answer
179
views
SwiftUI: How to Navigate from Screen C Back to Screen A (Skipping Screen B) with Back Swipe Gesture?
I'm building a SwiftUI app where I have three screens (A, B, and C) navigated sequentially. The flow looks like this:
Screen A -> Screen B -> Screen C
I want to achieve the following behavior:
...
1
vote
1
answer
249
views
NavigationStack(path: ) - Is path meant to update the Binding<Value> passed in?
I'm a little confused by the syntax of NavigationStack(path: Binding), as mentioned above, it looks like NavigationStack should automatically handle the updating of path when a NavigationLink is ...
2
votes
2
answers
766
views
How to use a row in a Table() as a NavigationLink() in SwiftUI for macOS?
I'm trying to build an App with two rows NavigationSplitView. The sidebar is used to have categories and the main section as a table (!) of items. When an item (=row) in this table is doubleClicked I ...
0
votes
0
answers
877
views
NavigationLink does not work when running the app on iOS 18
I am testing out my app on iOS 18 Developer Beta and I noticed that one of my NavigationLink components is not working. It works on all other previous iOS versions, so it's definitely an 18 specific ...
-1
votes
1
answer
50
views
Unable to seque to new view with navigationlink
I am attempting to create a segue from one view to another in SwiftUI with NavigationLink but so far have been unable to get this to work. Here is the code I'm working with:
...
2
votes
1
answer
306
views
NavigationLinks don't open with List with selection inside NavigationStack. Show Toolbar between views inside NavigationStack
I use in my Swift UI application for iOS NavigationViews (as .stack). Also I use nested NavigationView inside NavigationView and everything looked as I needed. But I decied to fefuse to use deprecated ...
1
vote
1
answer
95
views
How can I combine the NavigationLink(value:label:) with a longPressGesture?
NavigationLink stops working if I add a .onLongPressGesture to my label element.
Since .onTapGesture and .onLongPressGesture work well together, I thought these could coexist as well.
I've found ...
2
votes
0
answers
98
views
SwiftUI toolbar bug inside NavigationView
I have code with NavigationView and some NavigationLinks so one of them has toolbar modifier.
My problem is that when I select first NavigationLink toolbar button act normally, but when I go to second ...
0
votes
1
answer
424
views
Is there a way to hide a toolbar in Swift without causing Views to shift?
Please bear with me on this question as I am still learning iOS development using Swift.
I currently have an app where the ContentView is a MapView with a clear toolbar at the top. The toolbar has a ...
1
vote
1
answer
253
views
How to get pickerStyle(.navigationLink) to scroll automatically to the selected value
I wish to use a picker with pickerStyle(.navigationLink) to select a value.
The list of values is long and so I would expect the picker list on the new screen to scroll automatically to ensure the ...
1
vote
2
answers
138
views
SwiftUI Handling EnvironmentObject Resets with navigationLink : Avoiding Navigation View Rebuilds
I have the code below where I use a NavigationLink to add multiple child views on button click. However, as soon as I increase the EnvironmentObject value, all views reset, and only ChildView 1 ...
1
vote
0
answers
1k
views
Abnormal number of gesture recognizer dependencies: 100. System performance may be affected
In my IOS application I have a problem with menu when I start changing tabs (for example 20 times) I am getting error Abnormal number of gesture recognizer dependencies: 100. System performance may be ...
0
votes
2
answers
95
views
View doesn't update if Source Array is updated
Imagine you have a struct like
struct TheObject: Identifiable, Hashable {
var id: String
var title: String
}
Now you store an array of that type inside a ViewModel
class Model: ...
0
votes
1
answer
76
views
SwiftUI and NavigationLink - optional var in destination view is not initialising
I use in iOS app NavigationLink in NavigationView (for supporting iOS 15). NavigationView contains list of some items. I would like to use the same view for adding new items and editing exist (after ...
0
votes
1
answer
377
views
How to style a view when used as a NavigationLink
struct Item: Identifiable {
let id = UUID()
let title: String
}
struct ContentView: View {
let items = [Item(title: "One"), Item(title: "Two"), Item(title: "...