diff options
Diffstat (limited to 'platform/ios/test/MGLMockGestureRecognizers.m')
-rw-r--r-- | platform/ios/test/MGLMockGestureRecognizers.m | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/platform/ios/test/MGLMockGestureRecognizers.m b/platform/ios/test/MGLMockGestureRecognizers.m deleted file mode 100644 index c818805174..0000000000 --- a/platform/ios/test/MGLMockGestureRecognizers.m +++ /dev/null @@ -1,55 +0,0 @@ - -#import "MGLMockGestureRecognizers.h" -#import "objc/runtime.h" - -@implementation UIPinchGestureRecognizerMock -@synthesize velocity; -@synthesize state; -- (CGPoint)locationInView:(nullable UIView *)view { return self.locationInViewOverride; } -@end - -@implementation UIRotationGestureRecognizerMock -- (CGPoint)locationInView:(nullable UIView*)view { return view.center; } -@synthesize state; -@end - -@implementation UITapGestureRecognizerMock - -+ (void)load { - method_exchangeImplementations(class_getInstanceMethod(self, @selector(state)), - class_getInstanceMethod(self, @selector(mockState))); -} - -- (UIGestureRecognizerState)mockState { - return UIGestureRecognizerStateRecognized; -} - -- (UIView *)view { - return self.mockTappedView; -} - -- (CGPoint)locationInView:(UIView *)view { - return self.mockTappedPoint; -} - -@end - -@implementation UILongPressGestureRecognizerMock -@synthesize state; - -- (CGPoint)locationInView:(UIView *)view { - return self.mockTappedPoint; -} -@end - -@implementation UIPanGestureRecognizerMock -@synthesize state; -@synthesize numberOfTouches; - -- (CGPoint)locationOfTouch:(NSUInteger)touchIndex inView:(UIView *)view { - if (touchIndex) { - return self.secondFingerPoint; - } - return self.firstFingerPoint; -} -@end |