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

Can I put an array into another array in swiftUI?

I have an array of cards and want to put them into an array of decks. Users can make their own decks and creates cards within. I've finished making the flashcard part of the app and you can make one deck only. NavigationView { Section { …
yeti
  • 1
0
votes
1 answer

List with Sections: Odd Behavior when item in list changes

I have a simple Demo App where I present Items in a List with two sections. The first section shows the favourite items, the second section contains the remaining items (which are not favourites). The odd behaviour occurs if I change the isFav…
0
votes
0 answers

Large space above navigationTitle (Swift / SwiftUI)

My view has this massive space above the title text and I was am not sure how to get rid of it as everything I've tried seems to do nothing. How can I remove this space? Initially, I intended to just hide the navigation bar, however, I want to the…
CartoonyAli
  • 45
  • 1
  • 6
0
votes
0 answers

iOS | SwiftUI | Undesirable result to exchange items between TimerView and TaskView through ContentView, @State isn't delivering results

I have three Views exchanging information, ContentView, TimerView and TaskView. I used @Binding in TaskView to bring data from TaskView to ContentView, now I want to use that data to pass into TimerView. I created a @State variable in ContentView to…
0
votes
1 answer

SwiftUI: how to have image in list view not have same action as list item?

I have a list inside a view. Inside the list, items are iterated through to populate the list. When you click on each list item, I want to navigate to another view. This is working as expected but I want to have a Button represented by a circle in…
0
votes
0 answers

Navigation Link Pops main view when pushed from side menu

I am using the navigation links with the side menu. As we can see from the below gif when the user is pushed to the inner view and open the menu then it automatically poped to root view and then pushed it to the profile view. I am expecting it to…
0
votes
1 answer

Programmatic NavigationLink selection change between detail views causes issues

In my app, I have a main list view with NavigationLinks to detail views. There is an onURLOpen modifier on the main view that will change a state selection variable to navigate to the appropriate detail view (using tagged NavigationLinks that are…
0
votes
2 answers

How can I remove the toggle button in Swiftui and how can I show a sidebar on the iPad when this is shown high up

I want a sidebar to be displayed on the iPad. However, what bothers me about the Swiftui Navigazion View is that I have this ugly toggle button. Furthermore I would like to show a sidebar when the iPad is held horizontally. Can I change the…
0
votes
1 answer

SwiftUI: Laggy NavigationBar Transition

I am building an iPad app and occurred this weird laggy transition when I use a NavigationBar and a ScrollView. You can see it here (I don't know if there is another way to share videos). My code looks like this: NavigationView { ZStack { …
0
votes
1 answer

How to complement UIScrollView in navigationView?

I'm currently developing an application using SwiftUI and trying to refresh data using pull action. When I implement the function in List it works, but if I use that in NavigationView the function doesn't work... //…
Tio
  • 944
  • 3
  • 15
  • 35
0
votes
1 answer

How can I hide the extra NavigationBar in SwiftUI

I have a problem I have in my code. 2 navigation links that go to different views. Does someone know how I can make the first navigation link not appear to me? This is my code: struct ContentView: View { @State var navigationFlag = false var…
0
votes
1 answer

How to navigate between screens using a button in SwiftUI

Hello, I want to navigate between windows using a button but not use a NavigationLink. It looks ugly. this is my code import SwiftUI struct ContentView: View { var body: some View { Button(action: action()){ Text("Hola") …
0
votes
1 answer

How do I create a navigation stack with a dynamic number of elements?

I'm trying to create a standard navigation stack in swiftui, the kicker is that I can have any number of pages. Here is my first attempt but for some reason my selection variable keeps getting reset to null after I attempt to navigate passed the…
0
votes
0 answers

SwiftUI button to change view

I followed this tuto : https://www.youtube.com/watch?v=mUMR5TCqpDU Until the end it's ok. But now I would like to add a button. So I created : bouton1 and 2 at the top And this is the header of my page : headerview I would like to go on another view…
8diamond
  • 1
  • 1
0
votes
0 answers

Updating the values in an array contained in a class/struct - SwiftUI

I'm creating an app that contains ingredients for foods (simplified version of the app for context of the question). However, I am not sure how to updates values of an array (ingredients). I have the following struct for each Food that contains a…
tyleroki
  • 191
  • 1
  • 11