Questions tagged [swiftui-navigationstack]

For questions about SwiftUI's NavigationStack, a view that displays a root view and enables you to present additional views over the root view.

198 questions
0
votes
1 answer

Cannot pass value from one view to another(SwiftUI)

I want to take 2 numbers input in the textField and print the multiplication of the two numbers in the third view(ResultView). I have 3 views :- a - ContentView(This view contains the navigation destination) struct ContentView: View { @State…
0
votes
0 answers

NavigationLink to NavigationStack or NavigationSplitView iOS 16

import SwiftUI import MapKit struct SearchView: View { @StateObject var locationManager: LocationManager = .init() @State var navigationTag: String? var body: some View { VStack{ HStack(spacing: 15){ …
0
votes
1 answer

How to dismiss a Sheet and open a NavigationLink in a new View?

I have a View with a search button in the toolbar. The search button presents a sheet to the user and when he clicks on a result I would like the sheet to be dismissed and a detailView to be opened rather than navigating to the detailView from…
Abdo23
  • 77
  • 7
0
votes
2 answers

How can i change the navigationTitle text color in a NavigationStack?

I tried this but not working : init() { let navBarAppearance = UINavigationBar.appearance() navBarAppearance.largeTitleTextAttributes = [.foregroundColor: UIColor.white] navBarAppearance.titleTextAttributes =…
Flincorp
  • 751
  • 9
  • 22
0
votes
1 answer

How to fix double back button in SwiftUI

I got 2 views. On the second view I have list of exercises and when I choose one of them and go inside I see double back. It's driving me crazy. First one: import SwiftUI struct ProgrammView: View { var body: some View { …
0
votes
0 answers

Correct way to use navigationDestination after async call - SwiftUI

So, i'm creating a simple login page where an async call is made passing the credentials and with a successful response, it should navigate to another view. The call is working just fine, i've managed to receive the correct response, but i can't get…
Boga
  • 371
  • 3
  • 14
0
votes
1 answer

NavigationLink don't navigate anymore after incomplete swipe from left to right

In my app I have a NavigationStack inside the detail of a NavigationSplitView. With the code below the navigation back and forward works fine but if from the detail, I incompletely swipe left to dismiss the view, the NavigationLink doesn't work…
0
votes
0 answers

How to open custom view and bottom sheet in tabbar views and Subview with sticky bottom tabbar in SWIFTUI?

Given code is for custom bottom tab-bar with plus button in center by using we need to hide and show one detail view and from last tab we are just opens menu from bottom sheet. Problem :- When we are hide and show a detail view using center button…
0
votes
1 answer

NavigationStack; View contents below navigation area(s)

I have a simple view that is somewhere in my navigationstack hierarchy. But the content is below the navigation areas top and bottom. How to solve this? I have not set to ignore safearea edges. What is causing this? struct PrivacyView: View { //…
0
votes
0 answers

SwiftUI Navigation - List loading multiple time after navigating from details

I am creating a SwiftUI List with Details. This list is fetching JSON data from Firebase Realtime. The data consist of 5 birds with an ID, a name and an image URL. My problem is the following: Each time I click on the back button after I navigate to…
0
votes
2 answers

passing an array of views in navigation Destination in SwiftUI iOS16

In the old style of NavigationView I was able to assign manually each view in a Navigation Link. However in iOS16 I don't know how to pass a list of view [MovieTitles(),Literature(),TrafficLights(), HistoryChannel()] in Navigation Destination. I…
CNunc
  • 3
  • 3
0
votes
0 answers

NavigationStack, NavigationLink and onLongPressGesture together

I have a view inside a NavigationStack (iOS16+) that shows a horizontal list of items (game). When tapping on it the app will proceed to the next screen in my app. But I also want to be able to show a sheet to be able to edit the details of game. I…
0
votes
1 answer

new navigation stack swiftui 4

Hello I'm using the new navigation stack and I don't really understand how it works in a situation like mine. I have the first view (DashboardView) from there I have two navigationdestination(isPresented) and from the second one I have to go a view…
0
votes
1 answer

Make Custom SwiftUI Views with ObservedObjects compatible with NavigationLink iOS 16

I don't feel that the following example is exhaustive (from Hacking With Swift). A lot of online examples tend to keep it quite elementary like this, where NavigationLinks are implemented based off of simple Hashable models. struct ContentView: View…
Andre
  • 562
  • 2
  • 7
  • 18
0
votes
2 answers

Undesired interplay between tapable, movable items and scrolling in SwiftUI List

I'm working on a SwiftUI list that shows tapable and long-pressable full-width items, which are movable, and allow for detail navigation. I've noticed that .onLongPressGesture isn't detected when the list allows for moving of items, because the List…
1 2 3
13
14