Questions tagged [swiftui-navigationview]

For questions about NavigationView - a view in Apple's SwiftUI framework that presents a stack of views representing a visible path in a navigation hierarchy. When using this tag also include the more generic [swiftui] tag where possible.

Links:

583 questions
0
votes
0 answers

Navigation bar pushed upwards when keyboard shows up SwiftUI

I am having trouble why my navigation bar pushed upward when keyboard shows up (refer to the first image). Unlike to the second image (iMessage screenshot), the navigation bar doesn't pushed upwards when keyboard. Here is my code import…
0
votes
0 answers

Unknown padding on list with navigation view SwiftUI IOS 14

I am using list in my view and it displays unknown padding and I don't know why. I already set the padding to 0 but nothing happens. Main View - Where list located struct GradeStudentsView: View { @ObservedObject var viewModel :…
0
votes
2 answers

How to navigate to any view inside of a NavigationView

I have these 3 different views they all connect to each other through a NavigationView. I am trying to find a way to navigate to a page earlier in the NavigationView but I want the transition to seem like it is going backwards. struct Testing: View…
runemonster
  • 177
  • 1
  • 11
0
votes
1 answer

SwiftUI - Best approach for when each listview's contents is dependent upon the selection in the previous listview?

I have 3 simple arrays: var myContintents = [Europe,Africa] var myCountries = [UK, France, Senegal] var myCities = [London, Birmingham, Paris, Dakar] Each array populates a listview, with a navigationlink to the next listview Listview 1 =…
0
votes
1 answer

Start where you left off in SwiftUI with NavigationView

I'm trying to have a multi-view workflow in SwiftUI where you can start back where you left off, yet still have nice transitions of NavigationView. As a basic example, I want it to have SignupView (where you enter user credentials) >…
0
votes
1 answer

SwiftUI using NavigationLink and NavigationView

I am trying to use NavigationView and NavigationLink in my code below. I heard that NavigationLink only works inside NavigationView. However, whenever I embed my ScrollView into a NavigationView, the scrollView stop showing up and I get a blank…
0
votes
1 answer

Is there a better way to open another view through the root view?

I'd like to navigate from View2Test to View3Test through RouterTest. I wrote the demo code the way I solved it. My question is why I need to use DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) to prevent View3Test from closing after it is…
-1
votes
0 answers

navigationLink doesn't work in a tabView xcode14

I'm working on a menu for an application where you can scroll through images that take up the entire screen. There is also an overlay button to access another swift file. However, this button appears, I don't have an error message but when I click…
-1
votes
2 answers

NavigationModel with iOS17 Observation

I'm playing around with new @Observable and kind of stuck around how to make properties bindable if it's inside environment object. So, in app i've setup navigation programmatically as apple suggests "Robust Navigation" and NavigationModel is…
Nitisha Sharma
  • 263
  • 3
  • 12
-1
votes
2 answers

Not able to use @State + didSet Property Observer and .onChange(of:) behaviour is not same as didSet

I have a notificationData @State property in my first view, and the values of this property are being set by the third subview when the user clicks on the list of notifications. After setting the value, I want to call a function to perform…
-1
votes
1 answer

Result of '..._View' initializer is unused

So I was designing a custom navigation bar in SwiftUI and I've come across this problem, any help is appreciated... You can see I already tried using states and if statements but I needed to add navigation links which got changed since IOS 16.0 and…
-1
votes
1 answer

How can I give a swiftUI button multiple functions when pressed?

I created a page for users to register new accounts. I created a "continue" button that is meant to push the new data to firebase and simultaneously move the users to the next view which is my mapView(). Right now the signup fucntion is working,…
-1
votes
1 answer

SwiftUI Remove Extra Space between NavigationTitle and TextView

Started learning SwiftUI, I want to remove this highlighted space between navigation title and Text inside VStack.
Sumit Jangra
  • 651
  • 5
  • 16
-1
votes
1 answer

Migrating to NavigationStack with .toolbar

Currently, I have a settings button inside the toolbar that when I tap on it it will open the SettingsView(). Here's my implementation below. @State private var goToSettings = false NavigationView { ZStack { NavigationLink(destination:…
-1
votes
1 answer

SwiftUI: How to reduce spacing between .navigationTitle and Section in a InsetGroupedListStyle

I have a list that I navigate to from a navigationLink. How do I reduce the space between the title and the start of the list? Applying a padding causes visual artifacts when entering the view.
1 2 3
38
39