title: How do I use translationInView: with UIPanGestureRecognizer to have an invisible slider effect?
body: <p>As a shortcut (by no means necessary) I have a UIPanGestureRecognizer on my view to allow the user to slide his/her finger up and down to set a value quickly, but I'm having trouble implementing this fully.</p>
  
  <p>I want to have it so a certain distance panned up or down increases or decreases the value proportionately.</p>
  
  <p>I tried to use <code>translationInView:</code>, but it only seems to be updating a few times unless I pan very slowly, unless I'm using it wrong.</p>
  
  <pre><code>- (IBAction)handlePan:(UIPanGestureRecognizer *)recognizer {
      CGPoint velocity = [recognizer velocityInView:recognizer.view];
  
      NSNumber *WPM = [[NSUserDefaults standardUserDefaults] objectForKey:@"WPM"];
  
      // If user is panning upward
      if (velocity.y &lt; 0) {
          CGPoint translation = [recognizer translationInView:recognizer.view];
  
          if (fmodf(translation.y, 10) == 0) {
              WPM = @([WPM intValue] + 5);
              [[NSUserDefaults standardUserDefaults] setObject:WPM forKey:@"WPM"];
              NSLog(@"%@", WPM);
          }
      }
      // If user is panning downward
      else if (velocity.y &gt; 0) {
          CGPoint translation = [recognizer translationInView:recognizer.view];
          if (fmodf(translation.y, 10) == 0) {
              WPM = @([WPM intValue] - 5);
              [[NSUserDefaults standardUserDefaults] setObject:WPM forKey:@"WPM"];
              NSLog(@"%@", WPM);
          }
      }
  }
  </code></pre>
  
  <p>If I drag slowly, the variable's value will climb relatively fast, but if I slide my finger up the screen very quickly, it barely adjusts the value at all. I want the exact opposite of this; slow movement allows fine control, while a fast motion allows quicker change.</p>
  
  <p>How exactly would I go about implementing this? It's not working very well as is.</p>