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

SwiftUI - disappearing reason

Suppose we have a view in NavigationView stack. This view has a onDisappear handler. The system calls this handler when the view is being covered by another view in stack, and when our view is popped from the stack. Is there a way to obtain a real…
Alexey
  • 79
  • 7
0
votes
1 answer

SwiftUI NavigationLink with constant binding for isActive

I don't understand why SwiftUI NavigationLink's isActive behaves as if it has it's own state. Even though I pass a constant to it, the back button overrides the value of the binding once pressed. Code: import Foundation import SwiftUI struct…
andras
  • 3,305
  • 5
  • 30
  • 45
0
votes
2 answers

SwiftUI change view from first screen to tabview screen

I want to change views once the user taps 'get started' but due to having navigation view in my first view, it is showing back button on my next screen which I don't want. Please see the images attached below. Code for the first view is…
user15091635
0
votes
0 answers

SwiftUI how to show large navigation title without using a navigation view?

I'm using the below PullToRefreshHack from this SO Answer which works well, but the problem is when I wrap it inside a NavigationView (which I need to be able to show this view's large navigation title) I loose the functionality of the pull to…
GarySabo
  • 5,806
  • 5
  • 49
  • 124
0
votes
1 answer

Swift UI with Nested Navigation Views

I am new to SwiftUI and Stack Overflow as well, so any help here is appreciated. I am currently making an app that has nested Navigation Views. However, one issue I am having is that when I am using these nested Views, the Navigation Titles (ex. the…
astronaut
  • 3
  • 2
0
votes
2 answers

Navigation Bar appearing when device is rotated to landscape using SwiftUI

The screen is working perfectly fine (No navigation bar) in: iPhone portrait mode iPad portrait mode iPad landscape mode It is only showing navigation bar (out of nowhere) in iPhone landscape mode. Can anyone please suggest what am I doing wrong…
0
votes
0 answers

Type 'Job' has no member 'subscript'

Ok, so i'm trying to get a list element in another view to view more details and interact with it. Right now, This is a snippet of the code: (Note, this is in a Navigation View and that syntax is correct) //below is listed before the…
0
votes
0 answers

SwiftUI NavigationView NavigationLink completion callback

Using SwiftUI, I have a List embedded in a Navigation view, when a user selects a row a new Map View is created via a NavigationLink. In this new Mapview, a user can add a pin on the map and select done via a trailing button (green airplane button)…
0
votes
1 answer

Navigate to next screen when Location Authorisation Status Change using SwiftUI + Combine

Below is the code. Here, LocationManager is the Observable class where I have marked "locationStatus" property as @Published. Now, what I want to achieve is when user sees the location Popup and gives Location access, it should navigate to next…
0
votes
1 answer

SwiftUI Elements in Nav Bar Don't Respond to State

My goal is to show a button in the navigation bar of a SwiftUI iOS app when the keyboard is visible, and hide it when the keyboard is not. I can get it to work with a button inside the main body of my view, but anything in the nav bar doesn't…
Clifton Labrum
  • 13,053
  • 9
  • 65
  • 128
0
votes
0 answers

SwiftUI: state passed to Child View not receiving updates?

I have a MasterView with a List. By clicking on an item, the DetailView is displayed. I am implementing this in the standard SwiftUI way, via the NavigationLink. I am passing the detailState to the DetailView as a parameter. I was expecting that…
0
votes
1 answer

SwiftUI 2.0: How to customize the iOS 14 navigation bar with toolbar() without a title?

I have the following setup for my iOS 14 App screen: import SwiftUI import UIKit struct MyNavigationView: View { init() { // Color Settings UINavigationBar.appearance().barTintColor = UIColor(named:"ToolbarBackgroundColor") …
0
votes
1 answer

Popover displaying inaccurate information inside ForEach

I'm having a problem where I have a ForEach loop inside a NavigationView. When I click the Edit button, and then click the pencil image at the right hand side on each row, I want it to display the text variable we are using from the ForEach loop.…
0
votes
1 answer

List is not propagating updates in DestinationView

The clocks will freeze once the detail view is fully presented. If you replace List with a ScrollView/VStack the propagation will flow. struct ContentView: View { @State private var clocks = [Date(), Date(), Date()] var body: some View…
Lorenzo Fiamingo
  • 3,251
  • 2
  • 17
  • 35
0
votes
1 answer

How to show same view as iPhone on iPad instead of Split view?

I want the views to look the same on iPad as they do on iPhone. Currently it looks like this: