SwiftUI certainly brings a lot to the table, especially as it's been built from the ground up using Swift at its core. This itself has a plethora of benefits, which include making use of some of the features we are about to cover in this section.
Getting ready
For this section, you'll need the latest version of Xcode available from the Mac App Store.
How to do it...
- Continuing with our existing Playground project, let's take another look at how things "stack up". We'll start by taking another look at our VStack:
VStack {
Text("Swift Cookbook")
Button(action: {
print("Set Action Here...")
}, label: {
Text("I'm going to perform an action")
})
}
Here is a block of code, which in SwiftUI terms is a View to be displayed. The view is a vertical stack—think UITableView, but at the same time don't think UITableView, as it's...