616 questions
2
votes
0
answers
909
views
SwiftUI - NavigationStack: Why my NavigationPath() is printing the wrong path.count?
I have the following basic utilization of NavigationStack with SwiftUI for iOS 16, Xcode.
The issues I am facing is that when I click back and printing the count, the root count is wrong and shows as &...
-1
votes
2
answers
1k
views
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 ...
0
votes
0
answers
87
views
SwiftUI Animation is not working properly when it’s in a stack
I'm trying to make a car animation by composing some view. First I gave an animation rotationeffect with 0.5 speed to the tire so it would rotate. Then I put the car body and tire into a zstack.
...
0
votes
1
answer
129
views
iOS16. How to disable NavigationLink animation?
Is it possible to disable NavigationLink transition animation in SwiftUI?
To be more precisely. I want to disable it only for a few links/views. Not the whole app
0
votes
1
answer
328
views
SwiftUI Custom TabBar View with nested NavigationView
Currently i'm Working in SwiftUi and I'm facing issue While using Custom TabBar With NavigationView issue like TabBar Not hiding when you navigate into a tab deeper! i have used like this
TabView {
...
1
vote
1
answer
382
views
SwiftUI: Subviews move up and down when wrapped in NavigationView
I'm trying to implement a custom TabView, and this is what I get when accessing it via NavigationLink or wrapping it in NavigationView. I've found no info on how to fix it.
I've tried wrapping ...
0
votes
0
answers
159
views
Can Sign Up via Supabase but user isn't taken to the next view
I am building my first iOS app with Supabase. I can create a user in the Database when the user clicks SignUp but the user is not taken to the next HomeView. The app does nothing and I see nothing in ...
1
vote
1
answer
709
views
How to replace back button of NavigationView from inside a UIViewControllerRepresentable?
Consider a UIVIewController where a custom back button needs to be set. The reason is that the user should be presented a confirmation dialog before navigating back where they can cancel the ...
1
vote
0
answers
513
views
SwiftUI NavigationView drawer hidden in iPad Portrait
I have a SwiftUI master / detail NavigationView, with the master view being a list of countries, and the detail view being a list of cities in each country.
This works fine in every layout (macOS ...
1
vote
0
answers
120
views
NavigationStackView with .searchable modifier works as expected, NavigationSplitView is crashing
NavigationStackView with .searchable modifier is working as expected.
struct NavStackListSearchView: View {
@State private var items = ["Item1", "Item2", "Item3", &...
1
vote
1
answer
1k
views
How to call Task in NavigationLink destination in SwiftUI?
I've created a list using LazyVStack and inside of the list there are ListItemViews.
What I'm trying to do is, when a ListItemView gets tapped, I want to make an async call depending on the selected ...
0
votes
1
answer
123
views
NavigationLink off bottom of screen not activating programmatically
I have a view where there is a calendar taking up space on the top of the screen. For the sake of this example I've simplified it to some text with a spacer. If you use the button to cause an item to ...
10
votes
1
answer
687
views
How to know when SwiftUI presentation has finished?
I want to know when my SwiftUI view has finished it's transition/animation in order to safely present additional views/modals.
Example:
I am in View A showing Sheet A.
Within Sheet A I tap a button ...
2
votes
1
answer
2k
views
How to Pop Particular view in SwiftUI NavigationView
View1 -> View2 -> View3 -> View4
How can I pop from View4 directly to View2 considering that we do not have control over the navigation stack ?
I try to Pop to the Root View in a SwiftUI ...
1
vote
1
answer
147
views
SwiftUI How to change Background Color of NavigationView with Form?
Is there possibility to change background color of this view?
Note: I dont want to change form sections color, i want to change background color of view.
`.background(Color.red) does not effect.
init()...
0
votes
0
answers
593
views
SWIFTUI: NavigationStack breaks what NavigationView was doing correctly. What's the best solution?
In one of the projects I decided to comply with apple and get rid of NavigationView.
In the project you had a list of buildings and after choosing a Building you had several tabs with bills, documents ...
0
votes
1
answer
126
views
Menu active sheet SwiftUI
I'm trying to create a menu in SwiftUI with the possibility of showing sheets, but when I try to display the menu the sheets doesn't display.
Here's the code:
import SwiftUI
enum ActiveSheet: ...
0
votes
1
answer
111
views
In Swift, how do I generate a new struct each time the NavigationLink is clicked on
I'm trying to make a small sudoku game. I have 3 views, a WelcomeView, a GameView, and a CellView. I also have a Board.swift file.
The logic behind the game is that Board generates an [[Int]] and the ...
0
votes
0
answers
41
views
Bottom Bar overlay outside navagationview
I am creating a UI from a mockup that looks like this.
You can see the bottom bar is over the navigation view but not over the sidebar. I want to make the bottom bar outside the navigation view so it ...
12
votes
2
answers
8k
views
SwiftUI Error: Update NavigationAuthority bound path tried to update multiple times per frame
I am getting the following debug message:
"Update NavigationAuthority bound path tried to update multiple times
per frame."
Does anyone know how to resolve the output message?
I can't find ...
1
vote
1
answer
137
views
List in NavigationView is calling init for every row
I'm making a Mac app using SwiftUI.
I have a simple 2 column NavigationView. The first view is a Sidebar containing a list, the second view is a detail view.
(I know NavigationView has been ...
1
vote
2
answers
1k
views
How to set the view on top in ios SwiftUI?
I had tried this code, I have also tried with stacks but not able to align with top .
I just want the view to appear on top with auto layout as like UIKit .
import SwiftUI
struct ItemDetail: View {
...
2
votes
2
answers
2k
views
Remove specific screen from NavigationView in SwiftUI
Currently i am using NavigationView->NavigationLink to navigate one screen to another. How can i remove specific screen from NavigationView?
For Example I have four screen A, B, C and D. The ...
0
votes
1
answer
2k
views
Multiple NavigationViews in SwiftUI - How to get rid of multiple toolbar items (i.e the back-button on the left corner)?
I am making an app where the first view the users see is a home screen with buttons that takes them to a second view. One of the second views present the user with a list of items. When the user ...
1
vote
2
answers
1k
views
SwiftUI Providing destination for NavigationLink in the view init resulting in "Type 'any View' cannot conform to 'View'" [duplicate]
I am trying to make a NavigationLink and provide the destination in its init but I am receiving an error:
Type 'any View' cannot conform to 'View'
struct MenuButton: View {
let iconName: ...