Questions tagged [navigationlink]

73 questions
2
votes
1 answer

SwiftUI update data for parent NavigationView

how can I update data in TextField that lives in the detail of a NavigationView? I want the data to be updated in the List of the parent View. Here is my code: class Address: ObservableObject, Identifiable { let id = UUID() @Published var…
user11960918
2
votes
1 answer

How to pop a UIViewControllerRepresentable from a SwiftUI navigation stack programmatically

Here is my SwiftUI setup: I have a SwiftUI view (called MapSearchView) that has a NavigationView that contains a NavigationLink. var body: some View { VStack { NavigationView { Form { Section (header:…
2
votes
1 answer

SwiftUI: NavigationLink unintentionally tappable and activated inside Form

I seem to have a problem where a NavigationLink is being reformatted in a Form. My NavigationLink is activated via isActive upon a button press that toggles showNext. The problem is that the NavigationLink seems to be activated on its own even when…
Ever Uribe
  • 639
  • 6
  • 13
2
votes
3 answers

SwiftUI NavigationView not see Image

I have a code and make NavigationLink Button, I write Text and Image, But my Image not a see. Pls help me. VStack{ Image("Coachs") .resizable() .aspectRatio(contentMode: .fill) .frame(width: 370, height:…
Artem
  • 59
  • 1
  • 7
2
votes
0 answers

SwiftUI List Blink when appears List on the screen?

I have create two screen, first screen have a Button and second screen having a List. When I click on “EmployeDetail” button using navigationLink it will navigate on List Screen. When it navigate first time list blink slightly. When I back on…
Ravindra_Bhati
  • 1,071
  • 13
  • 28
2
votes
0 answers

Why my NavigationLink() works only once but in a List() it works fine??

I try to learn SwiftUI but I don't understand why this works in the Apple tutorial, but not in my own project. I want to use my own Design and that means that the NavigationLink looks like a normal Button. The Problem is that this works only once…
onezero
  • 31
  • 4
2
votes
1 answer

Push, pop view controller equivalent in SwiftUI

What's equivalent to the Push and Pop of a view controller in SwiftUI?
2
votes
2 answers

Displaying a NavigationBar, inside a NavigationView, inside a TabView, after a NavigationLink. SwiftUI

I'm making an App in which user needs to Log In and after that take me to a TabView in which I have 3 different views (Navigation Views). The problem is after I Log In, and use a NavigationLink to send me to the TabView, to display me the 3…
2
votes
2 answers

How to navigate using button with condition check in SwiftUI

Since NavigationButton isn't available anymore, how do I check conditions in NavigationLink in order to navigate to another view? NavigationLink(destination: Dashboard(userName: self.userId, password:…
dinesh sharma
  • 577
  • 10
  • 20
2
votes
1 answer

Navigate SwiftUI page from WKWebView operation

I am a newbie in IOS Programming and also SwiftUI. Coming from Java/Kotlin Android. I want to learn SwiftUI. I have a WKWebView. I want to change SwiftUI page according to url changes in WKWebView. I have done a lot of work as you can see below.…
2
votes
0 answers

Q: SwiftUI - navigationBarTitle transparent error

UPDATE: Resolved - This topic is just a beta bug. I'm having a problem with the navigationBarTitle in SwiftUI. I'm using a NavigationLink to go to a second view with a list. This view has a navigationBarTitle like the first view. But in the second…
HeGe
  • 63
  • 6
2
votes
1 answer

SwiftUI: NavigationLink's Destination initialized whenever its parent is redrawn

So I have a ParentView, which has a NavigationLink, leading to a UIViewControllerRepresentable-conforming PageViewController. Now that ParentView also has some subscription on some publisher. Whenever that one is fired, not only will the ParentView…
hoshy
  • 481
  • 6
  • 15
2
votes
0 answers

SwiftUI Button action called on NavigationLink press, and the main view does not update

I have a SwiftUI view that looks like this (simplified for privacy reasons): var body: some View { HStack { Button(action: { self.completed.toggle() }) { Text(self.title) } …
Jack Bashford
  • 43,180
  • 11
  • 50
  • 79
1
vote
1 answer

SwiftUI NavigationLink not behaving correctly when buttons are close together

I'm trying to implement a programmable NavigationLink to go to another view, triggered by a simple button. But when that button is next to another button, instead of triggering the NavigationLink, it triggers the action of the button next to…
ltm
  • 111
  • 6
1
vote
1 answer

How can I prevent that all subviews are colored blue when embedding into a NavigationLink?

I have a rather complex view which I want to embed into a NavigationLink but if I do this all text colors turn blue. If the view would just be an image I would use the modifier renderingMode(.original). But my view consists of multiple stacks,…
the.blaggy
  • 815
  • 5
  • 16