title: SwiftUI: how to handle BOTH tap & long press of button?
body: <p>I have a button in SwiftUI and I would like to be able to have a different action for "tap button" (normal click/tap) and "long press".</p>
  
  <p>Is that possible in SwiftUI?</p>
  
  <p>Here is the simple code for the button I have now (handles only the "normal" tap/touch case).</p>
  
  <pre><code>Button(action: {self.BLEinfo.startScan() }) {
                          Text("Scan")
                      } .disabled(self.BLEinfo.isScanning)
  </code></pre>
  
  <p>I already tried to add a "longPress gesture" but it still only "executes" the "normal/short" click. This was the code I tried:</p>
  
  <pre><code>Button(action: {self.BLEinfo.startScan() }) {
                          Text("Scan")
                              .fontWeight(.regular)
                              .font(.body)
                          .gesture(
                              LongPressGesture(minimumDuration: 2)
                                  .onEnded { _ in
                                      print("Pressed!")
                              }
                          )
                      }
  </code></pre>
  
  <p>Thanks! </p>
  
  <p>Gerard</p>