31 lines
755 B
Mathematica
31 lines
755 B
Mathematica
|
//
|
||
|
// 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
|
||
|
|