I decided to give Challenge 11 a go, I am able to increment and multiply the value of the text box. However I am unable to get the text box to appear on another line other than being horizontal. The code that I have is below.
//
// ContentView.swift
// Shared
//
// Created by Eric Beecroft on 9/6/21.
//
import SwiftUI
struct ContentView: View {
@State private var score = 0;
var body: some View {
HStack{
Button(action: {
score += 2
}, label: {
SwiftUI.Text("Increment Score")
})
Button(action: {
score *= 2
}, label: {
HStack{
SwiftUI.Text("Multiply Score")
}
})
VStack{
SwiftUI.Text(String(score))
}
}
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}