ios-application
ios-application copied to clipboard
Adoption of SwiftUI
Is your feature request related to a problem? Please describe. I would love to get everyone's thoughts on adopting SwiftUI for new and existing (gradual replacement) views; I think it could be beneficial to use this framework based on these points:
- Remove the dependency on Eureka form builder (declarative form layouts with SwiftUI, with framework-native reactive properties that can handle the same on change behavior and dynamic hide/show child components based on state)
- Ability to create more dynamic layouts
- Addressing issues like #56 which require changes to cell layouts would be much easier; no need to use programmatic layout constraints or overhaul existing storyboard layouts to use
UIStackView
(see How to use Auto Layout to move other views when a view is hidden?)
- Addressing issues like #56 which require changes to cell layouts would be much easier; no need to use programmatic layout constraints or overhaul existing storyboard layouts to use
I know there are valid concerns with performance or even missing functionality when compared with some aspects of UIKit, however I think on balance it may be worth pursuing a gradual adoption of SwiftUI, where it makes sense. Definitely open to getting insight from everyone on this topic.
Describe the solution you'd like A consensus on the adoption of SwiftUI in the project, based on its merits and costs. Also an initial strategy for adoption (where, which components, etc.)
Describe alternatives you've considered Alternative is to use the existing UIKit paradigm for all UI elements.
Additional context Here is a helpful reference I used to understand the current state of SwiftUI better: https://www.jessesquires.com/blog/2021/07/01/is-swiftui-ready/
Agreed. I'm slowly migrating Raivo to SwiftUI, but it takes a while.
@tijme that's great to hear! Do you have a feature branch you're working on for this migration by any chance? I would love to take a look if you're open to sharing it, just so I can better understand your implementation approach/style
I don't have a feature branch unfortunately. My current approach was to create any new views in SwiftUI, and migrate old UIKit to SwiftUI once I have the time. An example (seen below) of something I implemented in SwifUI is the data export view.
My current/primary focus is to make sure the app works and is stable. But it would for sure be lovely to finally fully migrate to SwiftUI.