在我的应用程序中,我可以选择让用户向上平移以调整控件,但是当他们真正快速平移时它会有点慢,我想跳得更多。
// If user is panning upwards or downwards, adjust WPM every 8 translations in either direction
if (translation.y<-8 || translation.y>8) {
// Reset translation so we can see when it exceeds 8 again
[recognizer setTranslation:CGPointMake(0, 0) inView:self.view];
// Figure out direction, if pan down, decrease by 5, if up, increase by 5
int sign = (translation.y > 0) ? -1 : 1;
WPM = @([WPM intValue] + (sign * 5));
if ([WPM intValue] >= 200 && [WPM intValue] <= 1500) {
self.WPMLabel.text = [WPM stringValue];
self.wordsPerMinute = WPM;
[[NSUserDefaults standardUserDefaults] setObject:WPM forKey:@"WPM"];
}
}
我将如何改变它以考虑更快的加速?