GT2/GT2-iOS/node_modules/react-native-gesture-handler/ios/Handlers/RNPinchHandler.m

31 lines
755 B
Mathematica
Raw Normal View History

2018-02-12 17:26:06 +00:00
//
// RNPinchHandler.m
// RNGestureHandler
//
// Created by Krzysztof Magiera on 12/10/2017.
// Copyright © 2017 Software Mansion. All rights reserved.
//
#import "RNPinchHandler.h"
@implementation RNPinchGestureHandler
- (instancetype)initWithTag:(NSNumber *)tag
{
if ((self = [super initWithTag:tag])) {
_recognizer = [[UIPinchGestureRecognizer alloc] initWithTarget:self action:@selector(handleGesture:)];
}
return self;
}
- (RNGestureHandlerEventExtraData *)eventExtraData:(UIPinchGestureRecognizer *)recognizer
{
return [RNGestureHandlerEventExtraData
forPinch:recognizer.scale
withFocalPoint:[recognizer locationInView:recognizer.view]
withVelocity:recognizer.velocity];
}
@end