I was wondering if there is a predefined number input in SwiftUI for macOS which looks like this:
It is a casual Apple number input consisting of both the TextField and two increase and decrease buttons.
CodePudding user response:
HStack {
Text("Widths")
TextField("", value: $input, formatter: NumberFormatter())
.frame(width: 50)
Stepper(value: $input, in: 1...8) {
EmptyView()
}
}