Comments (9)
Hi team,
I think I found a fix on NavigationStackCompat.swift.
-
Line 27, I add @published on navigationType
@Published private(set) var navigationType = NavigationType.push
-
Line 61, I set navigationType before the animation
navigationType = .push
withAnimation(easing) {
-
Line 71, I set navigationType before the animation
navigationType = .pop
withAnimation(easing) {
Let me know what you think.
Thanks
from swiftui-navigation-stack.
@matteopuc +1 I have also weird behavior with iOS 16
from swiftui-navigation-stack.
Hi, I am facing the same issue (on iOS 16 only). For what I can tell and tested it seems that the popped view animation is broken (it slides to right instead of left). Have you found a solution for this ?
from swiftui-navigation-stack.
I make my all animations opacity
temporary as a workaround, but couldn't find a real
solution yet
from swiftui-navigation-stack.
Setting transitionType to .none at least turns off the faulty animation. I tried to figure out what went wrong in the code but no luck.
NavigationStackView(transitionType: .none)
from swiftui-navigation-stack.
I tested this simple script, and it has the same issue with iOS16:
https://stackoverflow.com/questions/63782469/swiftui-how-to-have-next-and-back-animations/63782921#63782921
This thread might help:
Has the behavior of asymmetric transitions changed in SwiftUI 4 / iOS 16?
https://developer.apple.com/forums/thread/714977
from swiftui-navigation-stack.
@samjoly Your fix works for me. Will you create a pull request?
from swiftui-navigation-stack.
Hey hello @matteopuc & @samjoly,
Since no-one had encouraged to create the PR, I just created it from @samjoly comment. Please check if everything is fine and let's merge it in order to have it in the library 🙂
from swiftui-navigation-stack.
Thank you so much for your help guys, the bug is fixed! 🙏
from swiftui-navigation-stack.
Related Issues (20)
- Stack Reset / Jump to a completely different view HOT 2
- Transition animation not working HOT 1
- @State variables get reset after pop HOT 3
- Support for iOS 15. HOT 1
- Push doesn't work if app is backgrounded and aware of scenePhase
- Return to the same position in the previous view HOT 2
- Support for Xcode 14 and new SwiftUI API HOT 6
- Previous view completely reloaded after pop HOT 1
- Popping to a specific view
- Callback navigation sometimes doesnt work HOT 1
- after pop,the previous scrollview auto scroll to top? HOT 6
- Xcode 14 Compiling Issue HOT 6
- not support swipe back HOT 2
- Referencing @Environment(\.scenePhase) var scenePhase breaks navigation when moving app to background
- [Bug]: Clicking on any other window in macOS will return stack to its root
- Value not changed by @Binding
- onappear excuse only first time
- how use in List cell
- after pop,the previous scrollview auto scroll to top?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swiftui-navigation-stack.