SwiftUIBackports
SwiftUIBackports copied to clipboard
Push Transition
Describe your changes
This pr adds a new push transition from SwiftUI 4 lifecycle
- Added func push(from edge: Edge) -> AnyTransition
Question: Is there an example how to add it to Backport?
@drucelweisse yep just checkout all existing backports. It's fairly self explanatory. We will need to test carefully to ensure it behaves identically to iOS 16 version (and other platforms) but the actual implementation you can workout from existing back ports
Yeah, I think that I got it, only current problem that AnyTransition doesn't have public init, and I'd like to use something like this:
Text("some text").transition(.backport.push(from: .top))
Is it ok to use identity for backport value?
Yeah, I think that I got it, only current problem that AnyTransition doesn't have public init, and I'd like to use something like this:
Text("some text").transition(.backport.push(from: .top))
Is it ok to use identity for backport value?
I think that's the right way to do it, as long as it behaves correctly I don't see an issue here.
Currently I don't have an iOS 16 on my device nor Xcode 14, so I don't know how to test it correctly. You can checkout Kavsoft video as reference. And my video where I added transition to demo app
https://user-images.githubusercontent.com/36012972/184420686-7534ff6b-fa60-48e4-a002-74f50088ca77.mp4
Ok got it! @drucelweisse amazing work thank you. I will check this out and just ensure it behaves correctly, then I'll get this included soon-ish. Thanks for your contribution 👍
Merging as this looks great, I'll get it into the next release, thanks again!