This small sample project explores sharing view model implementations between UIKit and SwiftUI. I wanted see what it would take to use the same view model class with a SwiftUI
and UIKit
view. In the iOS target of the app, the ExampleView
is powered by UIKit
, in the macOS target, it's powered by SwiftUI
. This view model structure could be useful for when you need to use different frameworks on different platforms. It also keeps things simple, whether you're building a SwiftUI
or UIKit
view, the view model layer can stay the same.
-
Notifications
You must be signed in to change notification settings - Fork 0
jordangustafson/SharedViewModels
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Explores sharing view models between UIKit and SwiftUI
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published