views:

67

answers:

1

Any idea if there is a simple way to lengthen the distance a swipe has to travel before being recognized. Seems the the default is really short. It's more than a tap, but just barely. Do I need to create a custom gesture recognizer to override this distance?

Thanks.

+1  A: 

Having no documented properties to set that means there're no documented properties to set that. You can create your own gesture recognizer, though.


There are 7 undocumented properties to change the default behavior:

@interface UISwipeGestureRecognizer()
@property(assign, nonatomic) CGFloat minimumPrimaryMovement;
@property(assign, nonatomic) CGFloat maximumPrimaryMovement;
@property(assign, nonatomic) CGFloat minimumSecondaryMovement;
@property(assign, nonatomic) CGFloat maximumSecondaryMovement;
@property(assign, nonatomic) NSTimeInterval maximumDuration;
@property(assign, nonatomic) float rateOfMinimumMovementDecay;
@property(assign, nonatomic) float rateOfMaximumMovementDecay;
@end

but if you write for AppStore you can't use these.

KennyTM
I won't be using private APIs, but your answer is helpful. Thanks.
Matt Long