From the course: iOS Development Tips

Unlock this course with a free trial

Join today to access over 23,200 courses taught by industry experts.

SwiftUI in Xcode Playgrounds

SwiftUI in Xcode Playgrounds

From the course: iOS Development Tips

SwiftUI in Xcode Playgrounds

- [Narrator] If you haven't yet updated or can't update to macOS Catalina, you may think you can't experience the SwiftUI preview pane in Xcode 11. If that is you, or you just want a fast prototype without making a full project, or you use a blank Playground, in Xcode 11 I'm going to open up a new Playground. So, I'm just going to go get started with a Playground. I'm going to use a blank Playground, and I'm just going to store it on my desktop. Nothing exciting there, and I'm just going to delete all this and then just start with import SwiftUI and import Playground Support. Then, I'm going to just put together, essentially, the template for a SwiftUI code, and that's going to be a struct. And, I'll just use content view. That adopts view. Now, when you adopt view, as we'll see in a second here, we get a does not conform error, and I'm going to just scoot this over so you can see the whole error. So, we got to put in body…

Contents