Issues with SwiftUI LazyVStack and onLoad Modifier below iOS 17 #3223
Unanswered
marisol-develop
asked this question in
Q&A
Replies: 1 comment 2 replies
-
Move the perceptiontracking up above the condition |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello! 👋
I am using SwiftUI + TCA with a minimum deployment target of iOS 16.0.
I am encountering some issues where certain features work correctly on iOS 17 and above but behave differently on versions below 17.
1.
In the LazyVStack's Section header, I have a condition to show a specific view if the condition is true and hide it if false. However, even when the condition is false, the view is still being displayed. Only when I set the opacity based on the same condition does the view finally get hidden.
Why is the view being displayed even when the condition is false?
2.
I am using an onLoad view modifier to execute logic only when the view is first loaded. However, on versions below 17, onLoad is being called twice. I suspect that the state of the didLoad property inside onLoad might be getting reset. I am curious about this as well.
[onLoad Modifier Implementation]
[onLoad ViewModifier Usage]
Thank you in advance for your help, and please let me know if you need any additional information! 🙇♀️
Beta Was this translation helpful? Give feedback.
All reactions