Created
December 8, 2019 20:10
-
-
Save paulweichhart/2af8be747500b12add67dd4f6e16ffbd to your computer and use it in GitHub Desktop.
SwiftUI Playground Template
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 Foundation | |
import PlaygroundSupport | |
import SwiftUI | |
struct Content: View { | |
var body: some View { | |
Text("ππ», π!") | |
} | |
} | |
PlaygroundPage.current.liveView = UIHostingController(rootView: Content()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Foundation isn't needed to get the Playground running β the import is just for convenience!
In Xcode 11.2.1 using
setLiveView()
wasn't working for me while using the UIHostingController did