Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save mattyoung/5c4c29cca5526158e924482af06bbdb2 to your computer and use it in GitHub Desktop.
Save mattyoung/5c4c29cca5526158e924482af06bbdb2 to your computer and use it in GitHub Desktop.
import SwiftUI
struct NavViewFormLabelRightJustified: View {
@State private var width = 25
@State private var height = 50
@State private var updatePeriod: Double = 1.0
var body: some View {
NavigationView {
Form {
HStack {
Text("width")
TextField("width", value: self.$width, formatter: NumberFormatter())
}
HStack {
Text("height")
TextField("height", value: self.$height, formatter: NumberFormatter())
}
HStack {
Text("updatePeriod")
TextField("updatePeriod", value: self.$updatePeriod, formatter: NumberFormatter())
}
}
}
}
}
struct NavViewFormLabelRightJustified_Previews: PreviewProvider {
static var previews: some View {
NavViewFormLabelRightJustified()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment