title: How to add blank space at the bottom of a form in SwiftUI?
body: <p>I have a modal sheet in SwiftUI for adding a record. The modal sheet uses a form with several TextField elements. Now I'd like to add some space to the end of the form with the same color as the form background (gray).</p>
  
  <p>Adding padding() to the last TextField results in all TextFields having a padding. Then I tried to add a Text("").hidden().padding(.bottom, 500) as the last form element, but the space is then filled with white background color.</p>
  
  <p>Update: Here's the result you get if you put a spacer with padding inside the Form view (background is red for demonstration):</p>
  
  <p><a href="https://i.stack.imgur.com/uyPyZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uyPyZ.png" alt="enter image description here"></a></p>
  
  <p>This is the code:</p>
  
  <pre><code>import SwiftUI
  
  struct ContentView: View {
      var body: some View {
          HStack {
              Text("Hello, World!")
          }
          .sheet(isPresented: .constant(true), content: { SheetView() }
          )
      }
  }
  
  struct SheetView: View {
      var body: some View {
          Form {
              TextField("Demo Field", text: .constant("KK"))
              Spacer()
                  .padding(.bottom, 500)
                  .background(Color(.red))
          }
      }
  }
  </code></pre>
  
  <p>What I'm looking for is the same as in Apple's Contacts app. If you go to "New Contact" and scroll down to the end of the form, there's quite some space:</p>
  
  <p><a href="https://i.stack.imgur.com/9lU3i.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9lU3i.png" alt="enter image description here"></a></p>