Skip to content

Instantly share code, notes, and snippets.

@jarrodnorwell
Created July 15, 2023 16:33
Show Gist options
  • Save jarrodnorwell/b3e2a51b672a267f93161f665eb96d21 to your computer and use it in GitHub Desktop.
Save jarrodnorwell/b3e2a51b672a267f93161f665eb96d21 to your computer and use it in GitHub Desktop.
import SwiftUI
struct DeIncrementView: View {
@State var value: Int = 0
var body: some View {
HStack {
Button {
value -= 1
}, label: {
Image(systemName: “minus.circle”)
}
Text(“\($value)”)
Button {
value += 1
}, label: {
Image(systemName: “plus.circle”)
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment