Member-only story
Write SwiftUI Entirely on an iPad Using Swift Playgrounds
You don’t need to open Xcode or even own a Mac to get started with Apple’s new declarative design framework. Write and test simultaneously!

Here are the basics of what this tutorial is about:
When Swift first appeared in 2014, it was designed to be an easy first programming language. Semi-colons aren’t required to end each line, conditional statements don’t need to be inside brackets, and it’s not necessary to end every case of a switch statement with a break. This makes it easier for kids to write their first code without needing to constantly look out for missing punctuation. The language was made more accessible when Apple released the Swift Playgrounds iPad app in 2016, making it even easier to learn the basics in a classroom or at home, even without a computer.
Until June 2019, the only way to design a user interface for a Swift app was using storyboards, a drag-and-drop interface that stored its data in a complicated XML file. This all changed when Apple announced SwiftUI, a declarative language for designing user interfaces that can be instantly previewed. The Swift Playgrounds iPad app has recently added support for SwiftUI, as well as the Combine framework which provides new ways to handle…