Skip to main content

All Questions

1 vote
1 answer
523 views

Use dismiss() to pop view from NavigationStack with different animation

I am using the @Environment(.dismiss) private var dismiss and than dismiss() to pop current view from NavigationStack. In my app it should look like going forward however, rather than backwards. When ...
Pawel Swiderski's user avatar
1 vote
1 answer
1k views

How to override default behaviour of NavigationView and NavigationStack in SwiftUI?

I'm curious, is there a way to override the default slide-in behaviour when navigating in SwiftUI? Here's some code where I'm unsuccessfully attempting to use .transition to affect the animation: ...
Curious Jorge's user avatar
3 votes
2 answers
2k views

How do I get the background in swiftui to scale to fit the whole screen

I'm still pretty new to swift UI, almost finished a project however no matter what I try I cannot get the background to take up the whole screen space, with the code below it still has a white border ...
molly0404's user avatar
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. ...
Deuniru's user avatar
  • 43
0 votes
1 answer
116 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
breq's user avatar
  • 25.6k
10 votes
1 answer
595 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 ...
Haensl's user avatar
  • 475
2 votes
2 answers
1k views

Transitions not working inside NavigationView

I am trying to navigate between two views without a NavigationLink. Here is the code: import SwiftUI struct NextView: View { @State var text = "" @Binding var displayView: ...
Laura Corssac's user avatar
1 vote
2 answers
865 views

SwiftUI Strange Animation Transitioning via NavigationLink to a new View?

I'm experiencing a strange animation behavior when transitioning from any item in the List of InsightsHomeView to InsightsCard Any idea what could cause this or how to fix? //Navigating from this ...
GarySabo's user avatar
  • 6,750
1 vote
0 answers
108 views

SwiftUI: how to remove animation on NavigationLink [duplicate]

Is there a way to remove the animation in NavigationLink ? That would be particularly useful when using deep-linking/programmatic-navigation, via the isActive binding. Displaying the animation is that ...
Daniele B's user avatar
  • 20.5k