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
1
vote
3 answers

SwiftUI NavigationLink isActive Binding Not Updated/Working

I have the following: @State private var showNext = false ... NavigationStack { VStack { NavigationLink(destination: NextView(showSelf: $showNext), isActive: $showNext) { EmptyView() } …
1
vote
1 answer

ProgressView updating on multiple steps of computation

I'm coding an app targeted at iOS but would be nice if it would still work (as is the case now) with iPadOS and macOS. This is a scientific app that performs matrices computations using LAPACK. A typical "step" of computation takes 1 to 5 seconds…
Guillaume
  • 33
  • 5
1
vote
1 answer

ActionSheet opens on wrong index than clicked index

Action sheet is not opening to the right clicked index, it always opens to the wrong index. Code snippet is- Steps are: 1: here passing data to LazyVGrid 2: A View that have some image, text and three dot button 3: A common view that will handle the…
1
vote
1 answer

SwiftUI: Navigate from a view with a navigationbackbutton to a fullscreen view

I am making a menu for my game using NavigationView and NavigationLink. I have three views as such: struct MainMenuView: View { var body: some View { NavigationView { // relevant stuff NavigationLink(destination:…
1
vote
1 answer

How to extend Navaigation View to show beyond safe area in swiftUI

I am trying to use NavigationView and created custom NavigationModifier: but the navigation bar has some white space at top , i want to cover it all with navigation bar it self. i tried adding ignoreSafeArea didn't got the result. Here is my…
1
vote
4 answers

How do I navigate to my SecondView by tapping image button?

I'm trying out NavigationView and want to move to SecondView on clicking radio-on-button. The code works fine if I'm using text button, I need to use an icon/image though and it doesn't work in that case. What am I missing? import SwiftUI struct…
1
vote
1 answer

SwiftUI create a navigation view option to default view

I have build a side menu with 4 cases and one of the is the Home struct SideMenuSwitchView: View { private let viewModel: SideMenuViewModel init(viewmodel: SideMenuViewModel) { self.viewModel = viewmodel } var…
1
vote
1 answer

How could I make a button change the value of a Bool in SwiftUI?

I am building an app that will store multiple Nintendo consoles and their details (kinda like Mactracker but for Nintendo stuff). I have a favourites view that stores only if consoles that only have a bool variable set to true, the consoles are…
Techtronis
  • 35
  • 6
1
vote
1 answer

How could I correctly implement favourites in SwiftUI?

I am building an app that will store multiple Nintendo consoles and their details (kinda like Mactracker but for Nintendo stuff). I wanna store consoles that the user chooses in a favourites category on the main menu but I can't implement it…
1
vote
1 answer

How to dismiss all the navigationLink views by tapping on TabItem?

ContentView.swift TabView{ RoomListView(myRoom: $viewModel.rooms) .onAppear { viewModel.populateRoomList() viewModel.roomJoinRequestUpdate() } .tabItem {Label("Rooms",…
1
vote
1 answer

Not able to pass returned value from viewB to viewA in SwiftUI

So I have a ViewA which returns a value called idd after defining a function addNote() and I wish to use that idd value in ViewB. I'm able to define idd in ViewB as viewA.addNote() however I'm not able to get the value of idd passed to viewB. And…
alex
  • 118
  • 1
  • 6
1
vote
0 answers

Navigation Link active on the whole List instead of just one view

I have the following view: List { VStack { InnerVStack { ... } InnerVStack { ... Cell() .background { NavigationLink() } ... } } } The problem is, that whenever the…
1
vote
1 answer

How to rebuild a NavigationView in SwiftUI

I'm rebuilding one of my apps in SwiftUI and wanted to add FaceID unlock. I found and used this article to add LocalAuthentication: https://medium.com/swlh/app-lock-with-face-id-touch-id-in-swiftui-2-0-feef21e8eba7 While the code does handle the…
Deddiekoel
  • 1,939
  • 3
  • 17
  • 25
1
vote
0 answers

NavigationLink gets triggered multiple times in Scrollview ForEach

I have a NavigationLink inside of a ForEach, which makes the NavigationLink gets called multiple times. I have tried many solutions to this. For E.g. moving the NavigationLink outside the ForEach loop. However, this messes with the animation: Look…
1
vote
1 answer

iOS SwiftUI - NavigationView NavigationLink: Close view with custom Button

I'm new to iOS development and think it's awesome, BUT I absolutely H A T E everything about NavigationView/NavigationLink, even in Android it's very hard to find such idiocy! In ContentView I have: NavigationLink(destination:…