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
1 answer

How do you return back to the HomeView after hitting a complete/submitted button?

I am running into an issue now. When I click on the button in my ResultsView, it does not go back to ContentView. It was previously working, and now is not for some reason. I have to use the navigation’s back button to go back to the ContentView.…
0
votes
1 answer

Can't see the back button in Navigation View

For some reason I can't see the back button in the Navigation View. I don't know if there is some extra code that I need to add in the child view but I don't know. I more or less copied the code from the tutorial, but I can't see the back button in…
0
votes
0 answers

SwiftUI View Overlap when integrated with Drag gesture

I am new to swiftUI and facing an issue when working with DragGesture functionality of view. I am trying to create a photo gallery app which have swipe functionality. Facing an issue with having a gesture view embedded in HStack with other 2 views.…
0
votes
1 answer

Hide top space in SwiftUI's NavigationView

I'm having trouble to remove the top space inside a NavigationView. You can see that in the first screen, I have the "Job filters" title, which is later shown in the back button when for example tapping on the Company picker, but the space that…
noloman
  • 11,411
  • 20
  • 82
  • 129
0
votes
1 answer

SwiftUI List Rows Different Heights for Different System Images

In my SwiftUI app, I have a List inside of a sidebar NavigationView with 2 rows, like this: List { NavigationLink(destination: MyView1()) { Label("Test Row 1", systemImage: "list.bullet") } NavigationLink(destination:…
0
votes
0 answers

SwiftUI App Crashes with 'NSInvalidArgumentException' only when List Cell Tapped From Search

Update: I have now been able to successfully reproduce the issue in a minimal app environment. See the new MyView.swift. As the title suggests, My SwiftUI app crashes with 'NSInvalidArgumentException' only when a List cell is tapped from a search…
0
votes
1 answer

when placing items in the toolbar, How do you remove the space where a navigation title would go

I've created a sample project that has a toolbar with text. All of my content has a space above it where a navigation title would go if I had one. I would like to remove this space. Here's my sample project: NavigationView { VStack(spacing: 0)…
0
votes
1 answer

How to recognise tap of Toggle Button for SwiftUI?

I have passed a constant value to Toggle since I want to perform certain acctions on value change of toggle and it needs to be done on Tap Gesture as internally I might need to change the value of toggle as well. But hus code is not working …
Abhishek
  • 93
  • 7
0
votes
2 answers

NavigationView scrolling broken when using TabView

With the below code I get a very weird scrolling behaviour in my TabViews, LoginView is called on app launch: struct LoginView: View { @State private var presentContent = false var body: some View { return…
Max B
  • 193
  • 1
  • 15
0
votes
0 answers

Pass through clicks/taps to underlying UIViewRepresentable

I have a UIViewRepresentable that I am using the blend a project created with UIViews and SwiftUI. My views are full screen and my issue is that I cannot find a way to pass touches through the transparent UINavigationBar at the top of the screen to…
rikitikitavi
  • 139
  • 13
0
votes
1 answer

SwiftUI - How To Set Child Screen Title

I have a SwiftUI Home screen: import SwiftUI struct HomeView: View { @State private var navigateToSettingsView : Bool = false var body: some View { NavigationView { if navigateToSettingsView { …
Perry Hoekstra
  • 2,687
  • 3
  • 33
  • 52
0
votes
0 answers

SwiftUI: Glitch during navigation between views with LinearGradient

It seems there is a visual glitch while I navigate between views implemented with SwiftUI that are using LinearGradient as background. In my test case there is a very small vertical flashing line on the left of the screen during navigation animation…
0
votes
1 answer

Blank Screen on Loading List in SwiftUI

I am trying to display a list in a view after a condition. If data is recieved from API than screen will load new view having list showing multiple fields. Here I am showing only one field in the list. The navigation code is working fine and data is…
tintin
  • 335
  • 2
  • 8
0
votes
0 answers

navigationLink to tag in another view

Here's an edited version of the question. I'm working in Swiftui and I have two views. The first has two NavigationLinks. The second link is where I get stuck. I would like that link to go to 'tabTwo' on PageTwo. Getting to PageTwo isn't an issue...…
0
votes
1 answer

How to add check mark to menu item and changes action based on selection in SwiftUI?

I have a ToolbarItem that when tapped, brings a menu of either Fahrenheit or Celsius. Right now I have that if the user taps on "Celsius" the temperatures will change to celsius unit and vice versa. However, I would like to add a check mark when the…