title: Can I set a lag time in between touchesBegan in Swift?
body: <p>My app has multiple balls, but only can be moved at a time. My code below shows that at <strong>touchesBegan</strong> I set specific fields used in <strong>touchesMoved</strong>. Within <strong>touchesCancelled</strong> and <strong>touchesEnded</strong> I reset everything.</p>
  <p>This is my first Swift app, but not my first program, I know users like to try and crash apps.  So with two fingers I started touching multiple balls as fast as I could, and eventually, yes, I ran through touchesBegan on another ball before the first one could be set as the &quot;moving&quot; ball.
  Is there any lag property where I can make the iOS wait even 0.3 seconds between touchesBegan?</p>
  <pre><code>override func touchesBegan(_ touches: Set&lt;UITouch&gt;, with event: UIEvent?){
      guard let touch = touches.first else { return }
      let location = touch.location(in: self)
      let touchedNodes = self.nodes(at: location)
      for node in  touchedNodes{
          if let theNode = node as? MyBall {
              if theNode.nodeType == .ball, theNode.isMoving == false,
                  (myGV.currentBall == nil) {
                      theNode.isMoving = true
                      theNode.zPosition += 1
                      myGV.currentBall = theNode
                  }
              }
          }
        }
  
  override func touchesMoved(_ touches: Set&lt;UITouch&gt;, with event: UIEvent?){
      guard touches.first != nil else { return }
      if let touch = touches.first, let node = myGV.currentBall, node.isMoving == true {
          let touchLocation = touch.location(in: self)
          node.position = touchLocation
          node.isMoving = true
          node.inSlot = false
      }
  }
  </code></pre>