title: iOS: How to get duration of long press gesture?
body: <p>I'm working on a game in which an attribute of a game object is set by long pressing on the object itself. The value of the attribute is determined by the duration of the long press gesture. I'm using UILongPressGestureRecognizer for this purpose, so it's something like this:</p>
  
  <pre><code>[gameObjectView addGestureRecognizer:[[UILongPressGestureRecognizer alloc] 
                                         initWithTarget:self action:@selector(handle:)]];
  </code></pre>
  
  <p>Then the handler function</p>
  
  <pre><code>- (void)handle:(UILongPressGestureRecognizer)gesture {
    if (gesture.state == UIGestureRecognizerStateEnded) {
      // Get the duration of the gesture and calculate the value for the attribute
    }
  }
  </code></pre>
  
  <p>How do I get the duration of the long press gesture in this case?</p>