문제

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.

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top