Use SwiftUI in a Playground

Let your imagination run wild!

Photo by Mink Mingle on Unsplash

Prerequisites:

Terminology

Playgrounds: A development environment that can be used to create Swift code

Creating a Playground: On a Mac

You do need to have downloaded and installed Xcode on your machine

The SwiftUI section

The key here is to use UIHostingController to, well, host your content view.

Click for Gist

Conclusion

Yeah playgrounds! Yeah SwiftUI.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store