A SwiftUI Xcode project in created in the same way as a regular Xcode project, but with one difference: you configure it to use SwiftUI instead of storyboards. As you will see, the user interface is generated entirely in code, and you'll be able to see changes in the user interface immediately as you modify your code.
You can watch a video of Apple's SwiftUI presentation during WWDC 2019 at https://developer.apple.com/videos/play/wwdc2019/204/.Apple's official SwiftUI tutorial can be found online at https://developer.apple.com/tutorials/swiftui/tutorials.
Let's begin by creating a new SwiftUI Xcode project. Perform the following steps:
- Create a new Xcode project.
- iOS should already be selected. Select the Single View App template, and then click Next.
- Enter LetsEatSwiftUI as the Product Name, choose SwiftUI from the User Interface...