title: number input with SwiftUI
body: <p>The new SwiftUI is fantastic to play with... I'm trying to use Forms instead of Eureka. A couple of questions:</p>
  
  <p>What is the best way to let the user enter a number? I used to do that with a UIPickerView, see image <a href="https://i.stack.imgur.com/fXUAT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fXUAT.png" alt="UIPickerView for numbers"></a>. </p>
  
  <p>With SwiftUI I only found Textfield, as in the following code:</p>
  
  <pre><code>import SwiftUI
  
  struct SettingsView : View {
      @State var email = ""
      @State var amount = ""
      var body: some View {
          NavigationView {
              Form {
                  Section(header: Text("Email")) {
                      TextField("Your email", text: $email)
                          .textFieldStyle(.roundedBorder)
                  }
                  Section(header: Text("Amount")) {
                      TextField("Amount", text: $amount)
                          .textFieldStyle(.roundedBorder)
                  }
                      .navigationBarTitle("Settings")
              }
          }
      }
  }
  </code></pre>
  
  <p>When you click in the field, the ABC keyboard comes up. The user can select '123' to get the number keyboard. But I would like to see a number pad instead. </p>
  
  <p>Also, the keyboard blocks the view (if you have more fields); the view doesn't scroll up to make room for the keyboard. </p>
  
  <p>Is it possible to get rid of the keyboard when the user clicks outside a TextField?</p>
  
  <p>And is there a way to 'validate the entries'? For instance, the amount should be between 10 and 1.000?</p>