Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is that possible to implement MVVM-C for SwiftUI? #1

Open
bengidev opened this issue Dec 9, 2024 · 1 comment
Open

Is that possible to implement MVVM-C for SwiftUI? #1

bengidev opened this issue Dec 9, 2024 · 1 comment

Comments

@bengidev
Copy link

bengidev commented Dec 9, 2024

Hello, i want to say thank you for your blogposts and examples of how to implement MVVM-C in simple and clear way. But i want to ask you about implementing this pattern in SwiftUI, is that still possible or not. If it is possible, can you make simple example of how to implement it in SwiftUI. Or if it is not possible, are you have another good pattern, but not over-complicated the project itself?

I hope you will read this.
Thank you

@wojciech-kulik
Copy link
Owner

Hi! Thank you!

Yes, it is possible, basically you do it the same way as in UIKit, and to present/push ViewControllers you wrap your SwiftUI view with UIHostingController(rootView: YourSwiftUIView()) :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants