Creating a SwiftUI Xcode project
A SwiftUI Xcode project is created in the same way as a regular Xcode project, but 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 2020 at: https://developer.apple.com/videos/play/wwdc2020/10119.
You can watch a video showing what’s new in SwiftUI during WWDC 2022 at: https://developer.apple.com/videos/play/wwdc2022/10052/.
Apple’s official SwiftUI documentation can be found online at: https://developer.apple.com/xcode/swiftui/.
Let’s begin by creating a new SwiftUI Xcode project. Follow these steps:
- Create a new Xcode project.
- Click iOS. Select the App template, and then click Next:
Figure 24.1: Project...