Question

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.

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top