23.4 Adding a Slider View to the Stack
The next item to be added to the layout is a Slider view. Within Xcode, display the Library panel by clicking on the ‘+’ button highlighted in Figure 23-5, locate the Slider in the View list and drag it over the top of the existing Text view within the preview canvas. Make sure the notification panel (also highlighted in Figure 23-5) indicates that the view is going to be inserted into the existing stack (as opposed to being placed in a new vertical stack) before dropping the view into place.
Figure 23-5
Once the slider has been dropped into place, the view implementation should read as follows:
struct ContentView: View {
var body: some View {
VStack {
VStack {
Text("...