Questions tagged [swiftui-navigationlink]

For questions about NavigationLink - a component in Apple's SwiftUI framework that triggers a navigation presentation when pressed. When using this tag also include the more generic [swiftui] tag where possible.

Links:

974 questions
0
votes
1 answer

Using SwiftUI. My Slider/Side-menu launches new Views just fine when clicked but click button and now all the options are 'dead'

Using SwiftUI and a slider/side menu tutorial that I have augmented in order to put actions on each of the side menu selections. When the side menu is displayed and I tap a menu option, it works great and takes me to a new view with a menu item. …
phil
  • 993
  • 1
  • 10
  • 34
0
votes
0 answers

In SwiftUI why does updating a View due to an ObserverObject change makes the Navigation pop there automatically?

I have a view in the navigation stack that depends on an ObservedObject that is changed later in time. When this change happens the navigation controller automatically pops there. Why is this happening and how to avoid it? This is part of the code…
Axy
  • 374
  • 2
  • 15
0
votes
1 answer

NavigationLink binding issue

I'm 100% brand new to not just Swift but development. I've been through a few books and I'm starting to get it, but I'm probably making some dumb mistake. The problem is I have a list displaying sets of Measurements() and I'm trying to get a…
DaddyWobs
  • 11
  • 2
0
votes
0 answers

Conditionally showing a Button in SwiftUI causes buttons to become unresponsive after navigation to a detail view

I have a setup view that lets you either start a new game or continue an ongoing game. I'm trying to show a "Continue Game" button only if the game is in progress but I can't get it to work. Once you start a new game and then go back to the setup…
Melodius
  • 2,505
  • 3
  • 22
  • 37
0
votes
1 answer

Differences in a body of view in SwiftUI

I have a list of Menu let muscleEtfs = Menu(name:"MuscleETFs", image:"image", destination: .muscleETFs) let menus: [Menu] = [home, marketTrend, indexes, sectors, stockAnalysis, backtest, screener, myPortfolio, watchList, muscleStocks,…
Nafiz
  • 462
  • 4
  • 17
0
votes
1 answer

Is there a way to supply a boolean statement in the isActive parameter within NavigationLink in SwiftUI?

I'm trying to get a NavigationLink to trigger when a string is no longer nil. Is there anyway to do this or something similar? NavigationLink(destination: MainView(), isActive: $settings.isLoggedS !=nil) Any help is greatly appreciated!
Sean Oplinger
  • 39
  • 1
  • 6
0
votes
0 answers

My view moves up when I implemented the navigation link in swiftui

Mockup of the Application Problem: My application successfully navigates from one view to another without any complexities.When I use the navigationLink to navigate from View 4 to View 2 (refer mockup). The view 2 movesup. I tried debugging but I…
Denzil
  • 415
  • 5
  • 13
-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

Swift UI Application Navigation Link is disable

I am trying to move to details view when user click the cell but I do not know why it disable and not able to move into details view when I click the particular cell form UI view .. Here is my code for content view .. struct ContentView: View { …
user8705895
-1
votes
1 answer

Hide & Disable TabBar when in NavigationDestination Subview - Apple Watch

I'm trying to create a UI layout and navigation functionality similar to the Apple Fitness app on Apple Watch. This is all WatchOS 9 so no need for older API support, phew! I want to have NavigationTitle set for each view in a TabBar. I want each…
Simon
  • 304
  • 2
  • 17
-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

NavigationLink is not affected by EditButton

I have a form that includes a NavigationLink and I'm expecting it to be enabled (tappable) after tapping the EditButton, but that's not happening. This is my code:
Mohammed
  • 1,432
  • 4
  • 18
  • 34
-1
votes
1 answer

For Each Loop from an array with Navigationlink Button —Argument passed to call that takes no arguments

Following an online tutorial for RevenueCat- Which calls information from an Array. This presents scrollable Pictures as clickable buttons. The problem that I am having is creating a Navigationlink to the different pictures relative to the…
-1
votes
1 answer

SwiftUI Navigation Bar Items - replace EditButton() with SF Symbol

When I run this code, I can't EDIT the LIST which doesn't display the DELETE and MOVE UI when the user taps Edit. My original code with the TEXT works. Apple EditButton docs - a button that toggles the edit mode environment value. [Apples docs…