Created
July 15, 2023 16:33
-
-
Save jarrodnorwell/b3e2a51b672a267f93161f665eb96d21 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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