Created
November 19, 2024 15:23
-
-
Save Kievkao/70cb52720cd9bea4e1252ee805a2fa42 to your computer and use it in GitHub Desktop.
SwiftUI preview in Playground
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import SwiftUI | |
| import PlaygroundSupport | |
| struct MyExperimentalView: View { | |
| var body: some View { | |
| Text("Hello") | |
| } | |
| } | |
| let view = MyExperimentalView() | |
| let hostingVC = UIHostingController(rootView: view) | |
| PlaygroundPage.current.liveView = hostingVC |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment