yeet
This commit is contained in:
4
node_modules/react-native-gesture-handler/ios/Handlers/RNFlingHandler.h
generated
vendored
Normal file
4
node_modules/react-native-gesture-handler/ios/Handlers/RNFlingHandler.h
generated
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
#import "RNGestureHandler.h"
|
||||
|
||||
@interface RNFlingGestureHandler : RNGestureHandler
|
||||
@end
|
33
node_modules/react-native-gesture-handler/ios/Handlers/RNFlingHandler.m
generated
vendored
Normal file
33
node_modules/react-native-gesture-handler/ios/Handlers/RNFlingHandler.m
generated
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
#import "RNFlingHandler.h"
|
||||
|
||||
@implementation RNFlingGestureHandler
|
||||
|
||||
- (instancetype)initWithTag:(NSNumber *)tag
|
||||
{
|
||||
if ((self = [super initWithTag:tag])) {
|
||||
_recognizer = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(handleGesture:)];
|
||||
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)configure:(NSDictionary *)config
|
||||
{
|
||||
[super configure:config];
|
||||
UISwipeGestureRecognizer *recognizer = (UISwipeGestureRecognizer *)_recognizer;
|
||||
|
||||
id prop = config[@"direction"];
|
||||
if (prop != nil) {
|
||||
recognizer.direction = [RCTConvert NSInteger:prop];
|
||||
}
|
||||
|
||||
#if !TARGET_OS_TV
|
||||
prop = config[@"numberOfPointers"];
|
||||
if (prop != nil) {
|
||||
recognizer.numberOfTouchesRequired = [RCTConvert NSInteger:prop];
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@end
|
||||
|
4
node_modules/react-native-gesture-handler/ios/Handlers/RNForceTouchHandler.h
generated
vendored
Normal file
4
node_modules/react-native-gesture-handler/ios/Handlers/RNForceTouchHandler.h
generated
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
#import "RNGestureHandler.h"
|
||||
|
||||
@interface RNForceTouchHandler : RNGestureHandler
|
||||
@end
|
148
node_modules/react-native-gesture-handler/ios/Handlers/RNForceTouchHandler.m
generated
vendored
Normal file
148
node_modules/react-native-gesture-handler/ios/Handlers/RNForceTouchHandler.m
generated
vendored
Normal file
@ -0,0 +1,148 @@
|
||||
#import "RNForceTouchHandler.h"
|
||||
|
||||
#import <UIKit/UIGestureRecognizerSubclass.h>
|
||||
|
||||
#import <React/RCTConvert.h>
|
||||
|
||||
@interface RNForceTouchGestureRecognizer : UIGestureRecognizer
|
||||
|
||||
@property (nonatomic) CGFloat maxForce;
|
||||
@property (nonatomic) CGFloat minForce;
|
||||
@property (nonatomic) CGFloat force;
|
||||
@property (nonatomic) BOOL feedbackOnActivation;
|
||||
|
||||
- (id)initWithGestureHandler:(RNGestureHandler*)gestureHandler;
|
||||
|
||||
@end
|
||||
|
||||
@implementation RNForceTouchGestureRecognizer {
|
||||
__weak RNGestureHandler *_gestureHandler;
|
||||
UITouch *_firstTouch;
|
||||
}
|
||||
|
||||
|
||||
- (id)initWithGestureHandler:(RNGestureHandler*)gestureHandler
|
||||
{
|
||||
if ((self = [super initWithTarget:gestureHandler action:@selector(handleGesture:)])) {
|
||||
_gestureHandler = gestureHandler;
|
||||
_force = 0;
|
||||
_minForce = 0.2;
|
||||
_maxForce = NAN;
|
||||
_feedbackOnActivation = NO;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
|
||||
{
|
||||
if (_firstTouch) {
|
||||
// ignore rest of fingers
|
||||
return;
|
||||
}
|
||||
[super touchesBegan:touches withEvent:event];
|
||||
_firstTouch = [touches anyObject];
|
||||
[self handleForceWithTouches:touches];
|
||||
self.state = UIGestureRecognizerStatePossible;
|
||||
}
|
||||
|
||||
- (void)touchesMoved:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
|
||||
{
|
||||
if (![touches containsObject:_firstTouch]) {
|
||||
// Considered only the very first touch
|
||||
return;
|
||||
}
|
||||
[super touchesMoved:touches withEvent:event];
|
||||
|
||||
[self handleForceWithTouches:touches];
|
||||
|
||||
if ([self shouldFail]) {
|
||||
self.state = UIGestureRecognizerStateFailed;
|
||||
return;
|
||||
}
|
||||
|
||||
if (self.state == UIGestureRecognizerStatePossible && [self shouldActivate]) {
|
||||
[self performFeedbackIfRequired];
|
||||
self.state = UIGestureRecognizerStateBegan;
|
||||
}
|
||||
}
|
||||
|
||||
- (BOOL)shouldActivate {
|
||||
return (_force >= _minForce);
|
||||
}
|
||||
|
||||
- (BOOL)shouldFail {
|
||||
return TEST_MAX_IF_NOT_NAN(_force, _maxForce);
|
||||
}
|
||||
|
||||
- (void)performFeedbackIfRequired
|
||||
{
|
||||
#if !TARGET_OS_TV
|
||||
if (_feedbackOnActivation) {
|
||||
if (@available(iOS 10.0, *)) {
|
||||
[[[UIImpactFeedbackGenerator alloc] initWithStyle:(UIImpactFeedbackStyleMedium)] impactOccurred];
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
- (void)touchesEnded:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
|
||||
{
|
||||
if (![touches containsObject:_firstTouch]) {
|
||||
// Considered only the very first touch
|
||||
return;
|
||||
}
|
||||
[super touchesEnded:touches withEvent:event];
|
||||
if (self.state == UIGestureRecognizerStateBegan || self.state == UIGestureRecognizerStateChanged) {
|
||||
self.state = UIGestureRecognizerStateEnded;
|
||||
} else {
|
||||
self.state = UIGestureRecognizerStateFailed;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)handleForceWithTouches:(NSSet<UITouch *> *)touches {
|
||||
_force = _firstTouch.force / _firstTouch.maximumPossibleForce;
|
||||
}
|
||||
|
||||
- (void)reset {
|
||||
[super reset];
|
||||
_force = 0;
|
||||
_firstTouch = NULL;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation RNForceTouchHandler
|
||||
|
||||
- (instancetype)initWithTag:(NSNumber *)tag
|
||||
{
|
||||
if ((self = [super initWithTag:tag])) {
|
||||
_recognizer = [[RNForceTouchGestureRecognizer alloc] initWithGestureHandler:self];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)configure:(NSDictionary *)config
|
||||
{
|
||||
[super configure:config];
|
||||
RNForceTouchGestureRecognizer *recognizer = (RNForceTouchGestureRecognizer *)_recognizer;
|
||||
|
||||
APPLY_FLOAT_PROP(maxForce);
|
||||
APPLY_FLOAT_PROP(minForce);
|
||||
|
||||
id prop = config[@"feedbackOnActivation"];
|
||||
if (prop != nil) {
|
||||
recognizer.feedbackOnActivation = [RCTConvert BOOL:prop];
|
||||
}
|
||||
}
|
||||
|
||||
- (RNGestureHandlerEventExtraData *)eventExtraData:(RNForceTouchGestureRecognizer *)recognizer
|
||||
{
|
||||
return [RNGestureHandlerEventExtraData
|
||||
forForce: recognizer.force
|
||||
forPosition:[recognizer locationInView:recognizer.view]
|
||||
withAbsolutePosition:[recognizer locationInView:recognizer.view.window]
|
||||
withNumberOfTouches:recognizer.numberOfTouches];
|
||||
}
|
||||
|
||||
@end
|
||||
|
12
node_modules/react-native-gesture-handler/ios/Handlers/RNLongPressHandler.h
generated
vendored
Normal file
12
node_modules/react-native-gesture-handler/ios/Handlers/RNLongPressHandler.h
generated
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
//
|
||||
// RNLongPressHandler.h
|
||||
// RNGestureHandler
|
||||
//
|
||||
// Created by Krzysztof Magiera on 12/10/2017.
|
||||
// Copyright © 2017 Software Mansion. All rights reserved.
|
||||
//
|
||||
|
||||
#import "RNGestureHandler.h"
|
||||
|
||||
@interface RNLongPressGestureHandler : RNGestureHandler
|
||||
@end
|
83
node_modules/react-native-gesture-handler/ios/Handlers/RNLongPressHandler.m
generated
vendored
Normal file
83
node_modules/react-native-gesture-handler/ios/Handlers/RNLongPressHandler.m
generated
vendored
Normal file
@ -0,0 +1,83 @@
|
||||
//
|
||||
// RNLongPressHandler.m
|
||||
// RNGestureHandler
|
||||
//
|
||||
// Created by Krzysztof Magiera on 12/10/2017.
|
||||
// Copyright © 2017 Software Mansion. All rights reserved.
|
||||
//
|
||||
|
||||
#import "RNLongPressHandler.h"
|
||||
|
||||
#import <UIKit/UIGestureRecognizerSubclass.h>
|
||||
|
||||
#import <React/RCTConvert.h>
|
||||
|
||||
@interface RNBetterLongPressGestureRecognizer : UILongPressGestureRecognizer
|
||||
|
||||
- (id)initWithGestureHandler:(RNGestureHandler*)gestureHandler;
|
||||
|
||||
@end
|
||||
|
||||
@implementation RNBetterLongPressGestureRecognizer {
|
||||
__weak RNGestureHandler *_gestureHandler;
|
||||
}
|
||||
|
||||
- (id)initWithGestureHandler:(RNGestureHandler*)gestureHandler
|
||||
{
|
||||
if ((self = [super initWithTarget:gestureHandler action:@selector(handleGesture:)])) {
|
||||
_gestureHandler = gestureHandler;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)touchesMoved:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
|
||||
{
|
||||
[super touchesMoved:touches withEvent:event];
|
||||
if (_gestureHandler.shouldCancelWhenOutside && ![_gestureHandler containsPointInView]) {
|
||||
self.enabled = NO;
|
||||
self.enabled = YES;
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@implementation RNLongPressGestureHandler
|
||||
|
||||
- (instancetype)initWithTag:(NSNumber *)tag
|
||||
{
|
||||
if ((self = [super initWithTag:tag])) {
|
||||
_recognizer = [[RNBetterLongPressGestureRecognizer alloc] initWithGestureHandler:self];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)configure:(NSDictionary *)config
|
||||
{
|
||||
[super configure:config];
|
||||
UILongPressGestureRecognizer *recognizer = (UILongPressGestureRecognizer *)_recognizer;
|
||||
|
||||
id prop = config[@"minDurationMs"];
|
||||
if (prop != nil) {
|
||||
recognizer.minimumPressDuration = [RCTConvert CGFloat:prop] / 1000.0;
|
||||
}
|
||||
|
||||
prop = config[@"maxDist"];
|
||||
if (prop != nil) {
|
||||
recognizer.allowableMovement = [RCTConvert CGFloat:prop];
|
||||
}
|
||||
}
|
||||
|
||||
- (RNGestureHandlerState)state
|
||||
{
|
||||
// For long press recognizer we treat "Began" state as "active"
|
||||
// as it changes its state to "Began" as soon as the the minimum
|
||||
// hold duration timeout is reached, whereas state "Changed" is
|
||||
// only set after "Began" phase if there is some movement.
|
||||
if (_recognizer.state == UIGestureRecognizerStateBegan) {
|
||||
return RNGestureHandlerStateActive;
|
||||
}
|
||||
return [super state];
|
||||
}
|
||||
@end
|
||||
|
15
node_modules/react-native-gesture-handler/ios/Handlers/RNNativeViewHandler.h
generated
vendored
Normal file
15
node_modules/react-native-gesture-handler/ios/Handlers/RNNativeViewHandler.h
generated
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
//
|
||||
// RNNativeViewHandler.h
|
||||
// RNGestureHandler
|
||||
//
|
||||
// Created by Krzysztof Magiera on 12/10/2017.
|
||||
// Copyright © 2017 Software Mansion. All rights reserved.
|
||||
//
|
||||
|
||||
#import "RNGestureHandler.h"
|
||||
|
||||
@interface RNDummyGestureRecognizer : UIGestureRecognizer
|
||||
@end
|
||||
|
||||
@interface RNNativeViewGestureHandler : RNGestureHandler
|
||||
@end
|
149
node_modules/react-native-gesture-handler/ios/Handlers/RNNativeViewHandler.m
generated
vendored
Normal file
149
node_modules/react-native-gesture-handler/ios/Handlers/RNNativeViewHandler.m
generated
vendored
Normal file
@ -0,0 +1,149 @@
|
||||
//
|
||||
// RNNativeViewHandler.m
|
||||
// RNGestureHandler
|
||||
//
|
||||
// Created by Krzysztof Magiera on 12/10/2017.
|
||||
// Copyright © 2017 Software Mansion. All rights reserved.
|
||||
//
|
||||
|
||||
#import "RNNativeViewHandler.h"
|
||||
|
||||
#import <UIKit/UIGestureRecognizerSubclass.h>
|
||||
|
||||
#import <React/RCTConvert.h>
|
||||
#import <React/RCTScrollView.h>
|
||||
#import <React/UIView+React.h>
|
||||
|
||||
#pragma mark RNDummyGestureRecognizer
|
||||
|
||||
@implementation RNDummyGestureRecognizer
|
||||
|
||||
- (void)touchesEnded:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
|
||||
{
|
||||
self.state = UIGestureRecognizerStateFailed;
|
||||
[self reset];
|
||||
}
|
||||
|
||||
- (void)touchesCancelled:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
|
||||
{
|
||||
self.state = UIGestureRecognizerStateCancelled;
|
||||
[self reset];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
#pragma mark RNNativeViewgestureHandler
|
||||
|
||||
@implementation RNNativeViewGestureHandler {
|
||||
BOOL _shouldActivateOnStart;
|
||||
BOOL _disallowInterruption;
|
||||
}
|
||||
|
||||
- (instancetype)initWithTag:(NSNumber *)tag
|
||||
{
|
||||
if ((self = [super initWithTag:tag])) {
|
||||
_recognizer = [[RNDummyGestureRecognizer alloc] init];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)configure:(NSDictionary *)config
|
||||
{
|
||||
[super configure:config];
|
||||
_shouldActivateOnStart = [RCTConvert BOOL:config[@"shouldActivateOnStart"]];
|
||||
_disallowInterruption = [RCTConvert BOOL:config[@"disallowInterruption"]];
|
||||
}
|
||||
|
||||
- (void)bindToView:(UIView *)view
|
||||
{
|
||||
// For UIControl based views (UIButton, UISwitch) we provide special handling that would allow
|
||||
// for properties like `disallowInterruption` to work.
|
||||
if ([view isKindOfClass:[UIControl class]]) {
|
||||
UIControl *control = (UIControl *)view;
|
||||
[control addTarget:self action:@selector(handleTouchDown:forEvent:) forControlEvents:UIControlEventTouchDown];
|
||||
[control addTarget:self action:@selector(handleTouchUpOutside:forEvent:) forControlEvents:UIControlEventTouchUpOutside];
|
||||
[control addTarget:self action:@selector(handleTouchUpInside:forEvent:) forControlEvents:UIControlEventTouchUpInside];
|
||||
[control addTarget:self action:@selector(handleDragExit:forEvent:) forControlEvents:UIControlEventTouchDragExit];
|
||||
[control addTarget:self action:@selector(handleDragEnter:forEvent:) forControlEvents:UIControlEventTouchDragEnter];
|
||||
[control addTarget:self action:@selector(handleTouchCancel:forEvent:) forControlEvents:UIControlEventTouchCancel];
|
||||
} else {
|
||||
[super bindToView:view];
|
||||
}
|
||||
|
||||
// We can restore default scrollview behaviour to delay touches to scrollview's children
|
||||
// because gesture handler system can handle cancellation of scroll recognizer when JS responder
|
||||
// is set
|
||||
if ([view isKindOfClass:[RCTScrollView class]]) {
|
||||
// This part of the code is coupled with RN implementation of ScrollView native wrapper and
|
||||
// we expect for RCTScrollView component to contain a subclass of UIScrollview as the only
|
||||
// subview
|
||||
UIScrollView *scrollView = [view.subviews objectAtIndex:0];
|
||||
scrollView.delaysContentTouches = YES;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)handleTouchDown:(UIView *)sender forEvent:(UIEvent *)event
|
||||
{
|
||||
[self reset];
|
||||
|
||||
if (_disallowInterruption) {
|
||||
// When `disallowInterruption` is set we cancel all gesture handlers when this UIControl
|
||||
// gets DOWN event
|
||||
for (UITouch *touch in [event allTouches]) {
|
||||
for (UIGestureRecognizer *recogn in [touch gestureRecognizers]) {
|
||||
recogn.enabled = NO;
|
||||
recogn.enabled = YES;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[self sendEventsInState:RNGestureHandlerStateActive
|
||||
forViewWithTag:sender.reactTag
|
||||
withExtraData:[RNGestureHandlerEventExtraData forPointerInside:YES]];
|
||||
}
|
||||
|
||||
- (void)handleTouchUpOutside:(UIView *)sender forEvent:(UIEvent *)event
|
||||
{
|
||||
[self sendEventsInState:RNGestureHandlerStateEnd
|
||||
forViewWithTag:sender.reactTag
|
||||
withExtraData:[RNGestureHandlerEventExtraData forPointerInside:NO]];
|
||||
}
|
||||
|
||||
- (void)handleTouchUpInside:(UIView *)sender forEvent:(UIEvent *)event
|
||||
{
|
||||
[self sendEventsInState:RNGestureHandlerStateEnd
|
||||
forViewWithTag:sender.reactTag
|
||||
withExtraData:[RNGestureHandlerEventExtraData forPointerInside:YES]];
|
||||
}
|
||||
|
||||
- (void)handleDragExit:(UIView *)sender forEvent:(UIEvent *)event
|
||||
{
|
||||
// Pointer is moved outside of the view bounds, we cancel button when `shouldCancelWhenOutside` is set
|
||||
if (self.shouldCancelWhenOutside) {
|
||||
UIControl *control = (UIControl *)sender;
|
||||
[control cancelTrackingWithEvent:event];
|
||||
[self sendEventsInState:RNGestureHandlerStateEnd
|
||||
forViewWithTag:sender.reactTag
|
||||
withExtraData:[RNGestureHandlerEventExtraData forPointerInside:NO]];
|
||||
} else {
|
||||
[self sendEventsInState:RNGestureHandlerStateActive
|
||||
forViewWithTag:sender.reactTag
|
||||
withExtraData:[RNGestureHandlerEventExtraData forPointerInside:NO]];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)handleDragEnter:(UIView *)sender forEvent:(UIEvent *)event
|
||||
{
|
||||
[self sendEventsInState:RNGestureHandlerStateActive
|
||||
forViewWithTag:sender.reactTag
|
||||
withExtraData:[RNGestureHandlerEventExtraData forPointerInside:YES]];
|
||||
}
|
||||
|
||||
- (void)handleTouchCancel:(UIView *)sender forEvent:(UIEvent *)event
|
||||
{
|
||||
[self sendEventsInState:RNGestureHandlerStateCancelled
|
||||
forViewWithTag:sender.reactTag
|
||||
withExtraData:[RNGestureHandlerEventExtraData forPointerInside:NO]];
|
||||
}
|
||||
|
||||
@end
|
12
node_modules/react-native-gesture-handler/ios/Handlers/RNPanHandler.h
generated
vendored
Normal file
12
node_modules/react-native-gesture-handler/ios/Handlers/RNPanHandler.h
generated
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
//
|
||||
// RNPanHandler.h
|
||||
// RNGestureHandler
|
||||
//
|
||||
// Created by Krzysztof Magiera on 12/10/2017.
|
||||
// Copyright © 2017 Software Mansion. All rights reserved.
|
||||
//
|
||||
|
||||
#import "RNGestureHandler.h"
|
||||
|
||||
@interface RNPanGestureHandler : RNGestureHandler
|
||||
@end
|
239
node_modules/react-native-gesture-handler/ios/Handlers/RNPanHandler.m
generated
vendored
Normal file
239
node_modules/react-native-gesture-handler/ios/Handlers/RNPanHandler.m
generated
vendored
Normal file
@ -0,0 +1,239 @@
|
||||
//
|
||||
// RNPanHandler.m
|
||||
// RNGestureHandler
|
||||
//
|
||||
// Created by Krzysztof Magiera on 12/10/2017.
|
||||
// Copyright © 2017 Software Mansion. All rights reserved.
|
||||
//
|
||||
|
||||
#import "RNPanHandler.h"
|
||||
|
||||
#import <UIKit/UIGestureRecognizerSubclass.h>
|
||||
|
||||
@interface RNBetterPanGestureRecognizer : UIPanGestureRecognizer
|
||||
|
||||
@property (nonatomic) CGFloat minDistSq;
|
||||
@property (nonatomic) CGFloat minVelocityX;
|
||||
@property (nonatomic) CGFloat minVelocityY;
|
||||
@property (nonatomic) CGFloat minVelocitySq;
|
||||
@property (nonatomic) CGFloat activeOffsetXStart;
|
||||
@property (nonatomic) CGFloat activeOffsetXEnd;
|
||||
@property (nonatomic) CGFloat failOffsetXStart;
|
||||
@property (nonatomic) CGFloat failOffsetXEnd;
|
||||
@property (nonatomic) CGFloat activeOffsetYStart;
|
||||
@property (nonatomic) CGFloat activeOffsetYEnd;
|
||||
@property (nonatomic) CGFloat failOffsetYStart;
|
||||
@property (nonatomic) CGFloat failOffsetYEnd;
|
||||
|
||||
|
||||
- (id)initWithGestureHandler:(RNGestureHandler*)gestureHandler;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@implementation RNBetterPanGestureRecognizer {
|
||||
__weak RNGestureHandler *_gestureHandler;
|
||||
NSUInteger _realMinimumNumberOfTouches;
|
||||
BOOL _hasCustomActivationCriteria;
|
||||
}
|
||||
|
||||
- (id)initWithGestureHandler:(RNGestureHandler*)gestureHandler
|
||||
{
|
||||
if ((self = [super initWithTarget:gestureHandler action:@selector(handleGesture:)])) {
|
||||
_gestureHandler = gestureHandler;
|
||||
_minDistSq = NAN;
|
||||
_minVelocityX = NAN;
|
||||
_minVelocityY = NAN;
|
||||
_minVelocitySq = NAN;
|
||||
_activeOffsetXStart = NAN;
|
||||
_activeOffsetXEnd = NAN;
|
||||
_failOffsetXStart = NAN;
|
||||
_failOffsetXEnd = NAN;
|
||||
_activeOffsetYStart = NAN;
|
||||
_activeOffsetYEnd = NAN;
|
||||
_failOffsetYStart = NAN;
|
||||
_failOffsetYEnd = NAN;
|
||||
_hasCustomActivationCriteria = NO;
|
||||
#if !TARGET_OS_TV
|
||||
_realMinimumNumberOfTouches = self.minimumNumberOfTouches;
|
||||
#endif
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)setMinimumNumberOfTouches:(NSUInteger)minimumNumberOfTouches
|
||||
{
|
||||
_realMinimumNumberOfTouches = minimumNumberOfTouches;
|
||||
}
|
||||
|
||||
- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
|
||||
{
|
||||
#if !TARGET_OS_TV
|
||||
if (_hasCustomActivationCriteria) {
|
||||
// We use "minimumNumberOfTouches" property to prevent pan handler from recognizing
|
||||
// the gesture too early before we are sure that all criteria (e.g. minimum distance
|
||||
// etc. are met)
|
||||
super.minimumNumberOfTouches = 20;
|
||||
} else {
|
||||
super.minimumNumberOfTouches = _realMinimumNumberOfTouches;
|
||||
}
|
||||
#endif
|
||||
[super touchesBegan:touches withEvent:event];
|
||||
}
|
||||
|
||||
- (void)touchesMoved:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
|
||||
{
|
||||
[super touchesMoved:touches withEvent:event];
|
||||
if (self.state == UIGestureRecognizerStatePossible && [self shouldFailUnderCustomCriteria]) {
|
||||
self.state = UIGestureRecognizerStateFailed;
|
||||
return;
|
||||
}
|
||||
if ((self.state == UIGestureRecognizerStatePossible || self.state == UIGestureRecognizerStateChanged)) {
|
||||
if (_gestureHandler.shouldCancelWhenOutside && ![_gestureHandler containsPointInView]) {
|
||||
// If the previous recognizer state is UIGestureRecognizerStateChanged
|
||||
// then UIGestureRecognizer's sate machine will only transition to
|
||||
// UIGestureRecognizerStateCancelled even if you set the state to
|
||||
// UIGestureRecognizerStateFailed here. Making the behavior explicit.
|
||||
self.state = (self.state == UIGestureRecognizerStatePossible)
|
||||
? UIGestureRecognizerStateFailed
|
||||
: UIGestureRecognizerStateCancelled;
|
||||
[self reset];
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (_hasCustomActivationCriteria && self.state == UIGestureRecognizerStatePossible && [self shouldActivateUnderCustomCriteria]) {
|
||||
#if !TARGET_OS_TV
|
||||
super.minimumNumberOfTouches = _realMinimumNumberOfTouches;
|
||||
if ([self numberOfTouches] >= _realMinimumNumberOfTouches) {
|
||||
self.state = UIGestureRecognizerStateBegan;
|
||||
[self setTranslation:CGPointMake(0, 0) inView:self.view];
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
- (void)reset
|
||||
{
|
||||
self.enabled = YES;
|
||||
[super reset];
|
||||
}
|
||||
|
||||
- (void)updateHasCustomActivationCriteria
|
||||
{
|
||||
_hasCustomActivationCriteria = !isnan(_minDistSq)
|
||||
|| !isnan(_minVelocityX) || !isnan(_minVelocityY) || !isnan(_minVelocitySq)
|
||||
|| !isnan(_activeOffsetXStart) || !isnan(_activeOffsetXEnd)
|
||||
|| !isnan(_activeOffsetYStart) || !isnan(_activeOffsetYEnd);
|
||||
}
|
||||
|
||||
- (BOOL)shouldFailUnderCustomCriteria
|
||||
{
|
||||
CGPoint trans = [self translationInView:self.view];
|
||||
if (!isnan(_failOffsetXStart) && trans.x < _failOffsetXStart) {
|
||||
return YES;
|
||||
}
|
||||
if (!isnan(_failOffsetXEnd) && trans.x > _failOffsetXEnd) {
|
||||
return YES;
|
||||
}
|
||||
if (!isnan(_failOffsetYStart) && trans.y < _failOffsetYStart) {
|
||||
return YES;
|
||||
}
|
||||
if (!isnan(_failOffsetYEnd) && trans.y > _failOffsetYEnd) {
|
||||
return YES;
|
||||
}
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (BOOL)shouldActivateUnderCustomCriteria
|
||||
{
|
||||
CGPoint trans = [self translationInView:self.view];
|
||||
if (!isnan(_activeOffsetXStart) && trans.x < _activeOffsetXStart) {
|
||||
return YES;
|
||||
}
|
||||
if (!isnan(_activeOffsetXEnd) && trans.x > _activeOffsetXEnd) {
|
||||
return YES;
|
||||
}
|
||||
if (!isnan(_activeOffsetYStart) && trans.y < _activeOffsetYStart) {
|
||||
return YES;
|
||||
}
|
||||
if (!isnan(_activeOffsetYEnd) && trans.y > _activeOffsetYEnd) {
|
||||
return YES;
|
||||
}
|
||||
|
||||
if (TEST_MIN_IF_NOT_NAN(VEC_LEN_SQ(trans), _minDistSq)) {
|
||||
return YES;
|
||||
}
|
||||
|
||||
CGPoint velocity = [self velocityInView:self.view];
|
||||
if (TEST_MIN_IF_NOT_NAN(velocity.x, _minVelocityX)) {
|
||||
return YES;
|
||||
}
|
||||
if (TEST_MIN_IF_NOT_NAN(velocity.y, _minVelocityY)) {
|
||||
return YES;
|
||||
}
|
||||
if (TEST_MIN_IF_NOT_NAN(VEC_LEN_SQ(velocity), _minVelocitySq)) {
|
||||
return YES;
|
||||
}
|
||||
|
||||
return NO;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation RNPanGestureHandler
|
||||
|
||||
- (instancetype)initWithTag:(NSNumber *)tag
|
||||
{
|
||||
if ((self = [super initWithTag:tag])) {
|
||||
_recognizer = [[RNBetterPanGestureRecognizer alloc] initWithGestureHandler:self];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)configure:(NSDictionary *)config
|
||||
{
|
||||
[super configure:config];
|
||||
RNBetterPanGestureRecognizer *recognizer = (RNBetterPanGestureRecognizer *)_recognizer;
|
||||
|
||||
APPLY_FLOAT_PROP(minVelocityX);
|
||||
APPLY_FLOAT_PROP(minVelocityY);
|
||||
APPLY_FLOAT_PROP(activeOffsetXStart);
|
||||
APPLY_FLOAT_PROP(activeOffsetXEnd);
|
||||
APPLY_FLOAT_PROP(failOffsetXStart);
|
||||
APPLY_FLOAT_PROP(failOffsetXEnd);
|
||||
APPLY_FLOAT_PROP(activeOffsetYStart);
|
||||
APPLY_FLOAT_PROP(activeOffsetYEnd);
|
||||
APPLY_FLOAT_PROP(failOffsetYStart);
|
||||
APPLY_FLOAT_PROP(failOffsetYEnd);
|
||||
|
||||
#if !TARGET_OS_TV
|
||||
APPLY_NAMED_INT_PROP(minimumNumberOfTouches, @"minPointers");
|
||||
APPLY_NAMED_INT_PROP(maximumNumberOfTouches, @"maxPointers");
|
||||
#endif
|
||||
|
||||
id prop = config[@"minDist"];
|
||||
if (prop != nil) {
|
||||
CGFloat dist = [RCTConvert CGFloat:prop];
|
||||
recognizer.minDistSq = dist * dist;
|
||||
}
|
||||
|
||||
prop = config[@"minVelocity"];
|
||||
if (prop != nil) {
|
||||
CGFloat velocity = [RCTConvert CGFloat:prop];
|
||||
recognizer.minVelocitySq = velocity * velocity;
|
||||
}
|
||||
[recognizer updateHasCustomActivationCriteria];
|
||||
}
|
||||
|
||||
- (RNGestureHandlerEventExtraData *)eventExtraData:(UIPanGestureRecognizer *)recognizer
|
||||
{
|
||||
return [RNGestureHandlerEventExtraData
|
||||
forPan:[recognizer locationInView:recognizer.view]
|
||||
withAbsolutePosition:[recognizer locationInView:recognizer.view.window]
|
||||
withTranslation:[recognizer translationInView:recognizer.view]
|
||||
withVelocity:[recognizer velocityInView:recognizer.view.window]
|
||||
withNumberOfTouches:recognizer.numberOfTouches];
|
||||
}
|
||||
|
||||
@end
|
||||
|
12
node_modules/react-native-gesture-handler/ios/Handlers/RNPinchHandler.h
generated
vendored
Normal file
12
node_modules/react-native-gesture-handler/ios/Handlers/RNPinchHandler.h
generated
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
//
|
||||
// RNPinchHandler.h
|
||||
// RNGestureHandler
|
||||
//
|
||||
// Created by Krzysztof Magiera on 12/10/2017.
|
||||
// Copyright © 2017 Software Mansion. All rights reserved.
|
||||
//
|
||||
|
||||
#import "RNGestureHandler.h"
|
||||
|
||||
@interface RNPinchGestureHandler : RNGestureHandler
|
||||
@end
|
35
node_modules/react-native-gesture-handler/ios/Handlers/RNPinchHandler.m
generated
vendored
Normal file
35
node_modules/react-native-gesture-handler/ios/Handlers/RNPinchHandler.m
generated
vendored
Normal file
@ -0,0 +1,35 @@
|
||||
//
|
||||
// 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])) {
|
||||
#if !TARGET_OS_TV
|
||||
_recognizer = [[UIPinchGestureRecognizer alloc] initWithTarget:self action:@selector(handleGesture:)];
|
||||
#endif
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
#if !TARGET_OS_TV
|
||||
- (RNGestureHandlerEventExtraData *)eventExtraData:(UIPinchGestureRecognizer *)recognizer
|
||||
{
|
||||
return [RNGestureHandlerEventExtraData
|
||||
forPinch:recognizer.scale
|
||||
withFocalPoint:[recognizer locationInView:recognizer.view]
|
||||
withVelocity:recognizer.velocity
|
||||
withNumberOfTouches:recognizer.numberOfTouches];
|
||||
}
|
||||
#endif
|
||||
|
||||
@end
|
||||
|
12
node_modules/react-native-gesture-handler/ios/Handlers/RNRotationHandler.h
generated
vendored
Normal file
12
node_modules/react-native-gesture-handler/ios/Handlers/RNRotationHandler.h
generated
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
//
|
||||
// RNRotationHandler.h
|
||||
// RNGestureHandler
|
||||
//
|
||||
// Created by Krzysztof Magiera on 12/10/2017.
|
||||
// Copyright © 2017 Software Mansion. All rights reserved.
|
||||
//
|
||||
|
||||
#import "RNGestureHandler.h"
|
||||
|
||||
@interface RNRotationGestureHandler : RNGestureHandler
|
||||
@end
|
35
node_modules/react-native-gesture-handler/ios/Handlers/RNRotationHandler.m
generated
vendored
Normal file
35
node_modules/react-native-gesture-handler/ios/Handlers/RNRotationHandler.m
generated
vendored
Normal file
@ -0,0 +1,35 @@
|
||||
//
|
||||
// RNRotationHandler.m
|
||||
// RNGestureHandler
|
||||
//
|
||||
// Created by Krzysztof Magiera on 12/10/2017.
|
||||
// Copyright © 2017 Software Mansion. All rights reserved.
|
||||
//
|
||||
|
||||
#import "RNRotationHandler.h"
|
||||
|
||||
@implementation RNRotationGestureHandler
|
||||
|
||||
- (instancetype)initWithTag:(NSNumber *)tag
|
||||
{
|
||||
if ((self = [super initWithTag:tag])) {
|
||||
#if !TARGET_OS_TV
|
||||
_recognizer = [[UIRotationGestureRecognizer alloc] initWithTarget:self action:@selector(handleGesture:)];
|
||||
#endif
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
#if !TARGET_OS_TV
|
||||
- (RNGestureHandlerEventExtraData *)eventExtraData:(UIRotationGestureRecognizer *)recognizer
|
||||
{
|
||||
return [RNGestureHandlerEventExtraData
|
||||
forRotation:recognizer.rotation
|
||||
withAnchorPoint:[recognizer locationInView:recognizer.view]
|
||||
withVelocity:recognizer.velocity
|
||||
withNumberOfTouches:recognizer.numberOfTouches];
|
||||
}
|
||||
#endif
|
||||
|
||||
@end
|
||||
|
12
node_modules/react-native-gesture-handler/ios/Handlers/RNTapHandler.h
generated
vendored
Normal file
12
node_modules/react-native-gesture-handler/ios/Handlers/RNTapHandler.h
generated
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
//
|
||||
// RNTapHandler.h
|
||||
// RNGestureHandler
|
||||
//
|
||||
// Created by Krzysztof Magiera on 12/10/2017.
|
||||
// Copyright © 2017 Software Mansion. All rights reserved.
|
||||
//
|
||||
|
||||
#import "RNGestureHandler.h"
|
||||
|
||||
@interface RNTapGestureHandler : RNGestureHandler
|
||||
@end
|
218
node_modules/react-native-gesture-handler/ios/Handlers/RNTapHandler.m
generated
vendored
Normal file
218
node_modules/react-native-gesture-handler/ios/Handlers/RNTapHandler.m
generated
vendored
Normal file
@ -0,0 +1,218 @@
|
||||
//
|
||||
// RNTapHandler.m
|
||||
// RNGestureHandler
|
||||
//
|
||||
// Created by Krzysztof Magiera on 12/10/2017.
|
||||
// Copyright © 2017 Software Mansion. All rights reserved.
|
||||
//
|
||||
|
||||
#import "RNTapHandler.h"
|
||||
|
||||
#import <UIKit/UIGestureRecognizerSubclass.h>
|
||||
|
||||
#import <React/RCTConvert.h>
|
||||
|
||||
// RNBetterTapGestureRecognizer extends UIGestureRecognizer instead of UITapGestureRecognizer
|
||||
// because the latter does not allow for parameters like maxDelay, maxDuration, minPointers,
|
||||
// maxDelta to be configured. Using our custom implementation of tap recognizer we are able
|
||||
// to support these.
|
||||
|
||||
@interface RNBetterTapGestureRecognizer : UIGestureRecognizer
|
||||
|
||||
@property (nonatomic) NSUInteger numberOfTaps;
|
||||
@property (nonatomic) NSTimeInterval maxDelay;
|
||||
@property (nonatomic) NSTimeInterval maxDuration;
|
||||
@property (nonatomic) CGFloat maxDistSq;
|
||||
@property (nonatomic) CGFloat maxDeltaX;
|
||||
@property (nonatomic) CGFloat maxDeltaY;
|
||||
@property (nonatomic) NSInteger minPointers;
|
||||
|
||||
- (id)initWithGestureHandler:(RNGestureHandler*)gestureHandler;
|
||||
|
||||
@end
|
||||
|
||||
@implementation RNBetterTapGestureRecognizer {
|
||||
__weak RNGestureHandler *_gestureHandler;
|
||||
NSUInteger _tapsSoFar;
|
||||
CGPoint _initPosition;
|
||||
NSInteger _maxNumberOfTouches;
|
||||
}
|
||||
|
||||
- (id)initWithGestureHandler:(RNGestureHandler*)gestureHandler
|
||||
{
|
||||
if ((self = [super initWithTarget:gestureHandler action:@selector(handleGesture:)])) {
|
||||
_gestureHandler = gestureHandler;
|
||||
_tapsSoFar = 0;
|
||||
_numberOfTaps = 1;
|
||||
_minPointers = 1;
|
||||
_maxDelay = 0.2;
|
||||
_maxDuration = NAN;
|
||||
_maxDeltaX = NAN;
|
||||
_maxDeltaY = NAN;
|
||||
_maxDistSq = NAN;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)triggerAction
|
||||
{
|
||||
[_gestureHandler handleGesture:self];
|
||||
}
|
||||
|
||||
- (void)cancel
|
||||
{
|
||||
self.enabled = NO;
|
||||
}
|
||||
|
||||
- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
|
||||
{
|
||||
[super touchesBegan:touches withEvent:event];
|
||||
if (_tapsSoFar == 0) {
|
||||
_initPosition = [self locationInView:self.view];
|
||||
}
|
||||
_tapsSoFar++;
|
||||
if (_tapsSoFar) {
|
||||
[NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(cancel) object:nil];
|
||||
}
|
||||
NSInteger numberOfTouches = [touches count];
|
||||
if (numberOfTouches > _maxNumberOfTouches) {
|
||||
_maxNumberOfTouches = numberOfTouches;
|
||||
}
|
||||
if (!isnan(_maxDuration)) {
|
||||
[self performSelector:@selector(cancel) withObject:nil afterDelay:_maxDuration];
|
||||
}
|
||||
self.state = UIGestureRecognizerStatePossible;
|
||||
[self triggerAction];
|
||||
}
|
||||
|
||||
- (void)touchesMoved:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
|
||||
{
|
||||
[super touchesMoved:touches withEvent:event];
|
||||
NSInteger numberOfTouches = [touches count];
|
||||
if (numberOfTouches > _maxNumberOfTouches) {
|
||||
_maxNumberOfTouches = numberOfTouches;
|
||||
}
|
||||
|
||||
if (self.state != UIGestureRecognizerStatePossible) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ([self shouldFailUnderCustomCriteria]) {
|
||||
self.state = UIGestureRecognizerStateFailed;
|
||||
[self triggerAction];
|
||||
[self reset];
|
||||
return;
|
||||
}
|
||||
|
||||
self.state = UIGestureRecognizerStatePossible;
|
||||
[self triggerAction];
|
||||
}
|
||||
|
||||
- (CGPoint)translationInView {
|
||||
CGPoint currentPosition = [self locationInView:self.view];
|
||||
return CGPointMake(currentPosition.x - _initPosition.x, currentPosition.y - _initPosition.y);
|
||||
}
|
||||
|
||||
- (BOOL)shouldFailUnderCustomCriteria
|
||||
{
|
||||
if (_gestureHandler.shouldCancelWhenOutside) {
|
||||
if (![_gestureHandler containsPointInView]) {
|
||||
return YES;
|
||||
}
|
||||
}
|
||||
|
||||
CGPoint trans = [self translationInView];
|
||||
if (TEST_MAX_IF_NOT_NAN(fabs(trans.x), _maxDeltaX)) {
|
||||
return YES;
|
||||
}
|
||||
if (TEST_MAX_IF_NOT_NAN(fabs(trans.y), _maxDeltaY)) {
|
||||
return YES;
|
||||
}
|
||||
if (TEST_MAX_IF_NOT_NAN(fabs(trans.y * trans.y + trans.x + trans.x), _maxDistSq)) {
|
||||
return YES;
|
||||
}
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (void)touchesEnded:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
|
||||
{
|
||||
[super touchesEnded:touches withEvent:event];
|
||||
if (_numberOfTaps == _tapsSoFar && _maxNumberOfTouches >= _minPointers) {
|
||||
self.state = UIGestureRecognizerStateEnded;
|
||||
[self reset];
|
||||
} else {
|
||||
[self performSelector:@selector(cancel) withObject:nil afterDelay:_maxDelay];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)touchesCancelled:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
|
||||
{
|
||||
[super touchesCancelled:touches withEvent:event];
|
||||
self.state = UIGestureRecognizerStateCancelled;
|
||||
[self reset];
|
||||
}
|
||||
|
||||
- (void)reset
|
||||
{
|
||||
if (self.state == UIGestureRecognizerStateFailed) {
|
||||
[self triggerAction];
|
||||
}
|
||||
[NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(cancel) object:nil];
|
||||
_tapsSoFar = 0;
|
||||
_maxNumberOfTouches = 0;
|
||||
self.enabled = YES;
|
||||
[super reset];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation RNTapGestureHandler {
|
||||
RNGestureHandlerEventExtraData * _lastData;
|
||||
}
|
||||
|
||||
- (instancetype)initWithTag:(NSNumber *)tag
|
||||
{
|
||||
if ((self = [super initWithTag:tag])) {
|
||||
_recognizer = [[RNBetterTapGestureRecognizer alloc] initWithGestureHandler:self];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)configure:(NSDictionary *)config
|
||||
{
|
||||
[super configure:config];
|
||||
RNBetterTapGestureRecognizer *recognizer = (RNBetterTapGestureRecognizer *)_recognizer;
|
||||
|
||||
APPLY_INT_PROP(numberOfTaps);
|
||||
APPLY_INT_PROP(minPointers);
|
||||
APPLY_FLOAT_PROP(maxDeltaX);
|
||||
APPLY_FLOAT_PROP(maxDeltaY);
|
||||
|
||||
id prop = config[@"maxDelayMs"];
|
||||
if (prop != nil) {
|
||||
recognizer.maxDelay = [RCTConvert CGFloat:prop] / 1000.0;
|
||||
}
|
||||
|
||||
prop = config[@"maxDurationMs"];
|
||||
if (prop != nil) {
|
||||
recognizer.maxDuration = [RCTConvert CGFloat:prop] / 1000.0;
|
||||
}
|
||||
|
||||
prop = config[@"maxDist"];
|
||||
if (prop != nil) {
|
||||
CGFloat dist = [RCTConvert CGFloat:prop];
|
||||
recognizer.maxDistSq = dist * dist;
|
||||
}
|
||||
}
|
||||
|
||||
- (RNGestureHandlerEventExtraData *)eventExtraData:(UIGestureRecognizer *)recognizer{
|
||||
if (recognizer.state == UIGestureRecognizerStateEnded) {
|
||||
return _lastData;
|
||||
}
|
||||
|
||||
_lastData = [super eventExtraData:recognizer];
|
||||
return _lastData;
|
||||
}
|
||||
|
||||
@end
|
||||
|
73
node_modules/react-native-gesture-handler/ios/RNGestureHandler.h
generated
vendored
Normal file
73
node_modules/react-native-gesture-handler/ios/RNGestureHandler.h
generated
vendored
Normal file
@ -0,0 +1,73 @@
|
||||
#import "RNGestureHandlerState.h"
|
||||
#import "RNGestureHandlerDirection.h"
|
||||
#import "RNGestureHandlerEvents.h"
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <React/RCTConvert.h>
|
||||
|
||||
#define VEC_LEN_SQ(pt) (pt.x * pt.x + pt.y * pt.y)
|
||||
#define TEST_MIN_IF_NOT_NAN(value, limit) \
|
||||
(!isnan(limit) && ((limit < 0 && value <= limit) || (limit >= 0 && value >= limit)))
|
||||
|
||||
#define TEST_MAX_IF_NOT_NAN(value, max) \
|
||||
(!isnan(max) && ((max < 0 && value < max) || (max >= 0 && value > max)))
|
||||
|
||||
#define APPLY_PROP(recognizer, config, type, prop, propName) do { \
|
||||
id value = config[propName]; \
|
||||
if (value != nil) recognizer.prop = [RCTConvert type:value]; \
|
||||
} while(0)
|
||||
|
||||
#define APPLY_FLOAT_PROP(prop) do { APPLY_PROP(recognizer, config, CGFloat, prop, @#prop); } while(0)
|
||||
#define APPLY_INT_PROP(prop) do { APPLY_PROP(recognizer, config, NSInteger, prop, @#prop); } while(0)
|
||||
#define APPLY_NAMED_INT_PROP(prop, propName) do { APPLY_PROP(recognizer, config, NSInteger, prop, propName); } while(0)
|
||||
|
||||
@protocol RNGestureHandlerEventEmitter
|
||||
|
||||
- (void)sendTouchEvent:(nonnull RNGestureHandlerEvent *)event;
|
||||
|
||||
- (void)sendStateChangeEvent:(nonnull RNGestureHandlerStateChange *)event;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@protocol RNRootViewGestureRecognizerDelegate <UIGestureRecognizerDelegate>
|
||||
|
||||
- (void)gestureRecognizer:(nullable UIGestureRecognizer *)gestureRecognizer
|
||||
didActivateInRootView:(nullable UIView *)rootView;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@interface RNGestureHandler : NSObject <UIGestureRecognizerDelegate> {
|
||||
|
||||
@protected UIGestureRecognizer *_recognizer;
|
||||
@protected RNGestureHandlerState _lastState;
|
||||
|
||||
}
|
||||
|
||||
+ (nullable RNGestureHandler *)findGestureHandlerByRecognizer:(nonnull UIGestureRecognizer *)recognizer;
|
||||
|
||||
- (nonnull instancetype)initWithTag:(nonnull NSNumber *)tag;
|
||||
|
||||
@property (nonatomic, readonly, nonnull) NSNumber *tag;
|
||||
@property (nonatomic, weak, nullable) id<RNGestureHandlerEventEmitter> emitter;
|
||||
@property (nonatomic, readonly, nullable) UIGestureRecognizer *recognizer;
|
||||
@property (nonatomic) BOOL enabled;
|
||||
@property(nonatomic) BOOL shouldCancelWhenOutside;
|
||||
|
||||
- (void)bindToView:(nonnull UIView *)view;
|
||||
- (void)unbindFromView;
|
||||
- (void)configure:(nullable NSDictionary *)config NS_REQUIRES_SUPER;
|
||||
- (void)handleGesture:(nonnull id)recognizer;
|
||||
- (BOOL)containsPointInView;
|
||||
- (RNGestureHandlerState)state;
|
||||
- (nullable RNGestureHandlerEventExtraData *)eventExtraData:(nonnull id)recognizer;
|
||||
|
||||
- (void)reset;
|
||||
- (void)sendEventsInState:(RNGestureHandlerState)state
|
||||
forViewWithTag:(nonnull NSNumber *)reactTag
|
||||
withExtraData:(RNGestureHandlerEventExtraData *)extraData;
|
||||
|
||||
@end
|
||||
|
344
node_modules/react-native-gesture-handler/ios/RNGestureHandler.m
generated
vendored
Normal file
344
node_modules/react-native-gesture-handler/ios/RNGestureHandler.m
generated
vendored
Normal file
@ -0,0 +1,344 @@
|
||||
#import "RNGestureHandler.h"
|
||||
|
||||
#import "Handlers/RNNativeViewHandler.h"
|
||||
|
||||
#import <UIKit/UIGestureRecognizerSubclass.h>
|
||||
|
||||
#import <React/UIView+React.h>
|
||||
|
||||
@interface UIGestureRecognizer (GestureHandler)
|
||||
@property (nonatomic, readonly) RNGestureHandler *gestureHandler;
|
||||
@end
|
||||
|
||||
|
||||
@implementation UIGestureRecognizer (GestureHandler)
|
||||
|
||||
- (RNGestureHandler *)gestureHandler
|
||||
{
|
||||
id delegate = self.delegate;
|
||||
if ([delegate isKindOfClass:[RNGestureHandler class]]) {
|
||||
return (RNGestureHandler *)delegate;
|
||||
}
|
||||
return nil;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
typedef struct RNGHHitSlop {
|
||||
CGFloat top, left, bottom, right, width, height;
|
||||
} RNGHHitSlop;
|
||||
|
||||
static RNGHHitSlop RNGHHitSlopEmpty = { NAN, NAN, NAN, NAN, NAN, NAN };
|
||||
|
||||
#define RNGH_HIT_SLOP_GET(key) (prop[key] == nil ? NAN : [prop[key] doubleValue])
|
||||
#define RNGH_HIT_SLOP_IS_SET(hitSlop) (!isnan(hitSlop.left) || !isnan(hitSlop.right) || \
|
||||
!isnan(hitSlop.top) || !isnan(hitSlop.bottom))
|
||||
#define RNGH_HIT_SLOP_INSET(key) (isnan(hitSlop.key) ? 0. : hitSlop.key)
|
||||
|
||||
CGRect RNGHHitSlopInsetRect(CGRect rect, RNGHHitSlop hitSlop) {
|
||||
rect.origin.x -= RNGH_HIT_SLOP_INSET(left);
|
||||
rect.origin.y -= RNGH_HIT_SLOP_INSET(top);
|
||||
|
||||
if (!isnan(hitSlop.width)) {
|
||||
if (!isnan(hitSlop.right)) {
|
||||
rect.origin.x = rect.size.width - hitSlop.width + RNGH_HIT_SLOP_INSET(right);
|
||||
}
|
||||
rect.size.width = hitSlop.width;
|
||||
} else {
|
||||
rect.size.width += (RNGH_HIT_SLOP_INSET(left) + RNGH_HIT_SLOP_INSET(right));
|
||||
}
|
||||
if (!isnan(hitSlop.height)) {
|
||||
if (!isnan(hitSlop.bottom)) {
|
||||
rect.origin.y = rect.size.height - hitSlop.height + RNGH_HIT_SLOP_INSET(bottom);
|
||||
}
|
||||
rect.size.height = hitSlop.height;
|
||||
} else {
|
||||
rect.size.height += (RNGH_HIT_SLOP_INSET(top) + RNGH_HIT_SLOP_INSET(bottom));
|
||||
}
|
||||
return rect;
|
||||
}
|
||||
|
||||
static NSHashTable<RNGestureHandler *> *allGestureHandlers;
|
||||
|
||||
@implementation RNGestureHandler {
|
||||
NSArray<NSNumber *> *_handlersToWaitFor;
|
||||
NSArray<NSNumber *> *_simultaneousHandlers;
|
||||
RNGHHitSlop _hitSlop;
|
||||
uint16_t _eventCoalescingKey;
|
||||
}
|
||||
|
||||
- (instancetype)initWithTag:(NSNumber *)tag
|
||||
{
|
||||
if ((self = [super init])) {
|
||||
_tag = tag;
|
||||
_lastState = RNGestureHandlerStateUndetermined;
|
||||
_hitSlop = RNGHHitSlopEmpty;
|
||||
|
||||
static dispatch_once_t onceToken;
|
||||
dispatch_once(&onceToken, ^{
|
||||
allGestureHandlers = [NSHashTable weakObjectsHashTable];
|
||||
});
|
||||
|
||||
[allGestureHandlers addObject:self];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)configure:(NSDictionary *)config
|
||||
{
|
||||
_handlersToWaitFor = [RCTConvert NSNumberArray:config[@"waitFor"]];
|
||||
_simultaneousHandlers = [RCTConvert NSNumberArray:config[@"simultaneousHandlers"]];
|
||||
|
||||
id prop = config[@"enabled"];
|
||||
if (prop != nil) {
|
||||
self.enabled = [RCTConvert BOOL:prop];
|
||||
} else {
|
||||
self.enabled = YES;
|
||||
}
|
||||
|
||||
prop = config[@"shouldCancelWhenOutside"];
|
||||
if (prop != nil) {
|
||||
_shouldCancelWhenOutside = [RCTConvert BOOL:prop];
|
||||
} else {
|
||||
_shouldCancelWhenOutside = NO;
|
||||
}
|
||||
|
||||
prop = config[@"hitSlop"];
|
||||
if ([prop isKindOfClass:[NSNumber class]]) {
|
||||
_hitSlop.left = _hitSlop.right = _hitSlop.top = _hitSlop.bottom = [prop doubleValue];
|
||||
} else if (prop != nil) {
|
||||
_hitSlop.left = _hitSlop.right = RNGH_HIT_SLOP_GET(@"horizontal");
|
||||
_hitSlop.top = _hitSlop.bottom = RNGH_HIT_SLOP_GET(@"vertical");
|
||||
_hitSlop.left = RNGH_HIT_SLOP_GET(@"left");
|
||||
_hitSlop.right = RNGH_HIT_SLOP_GET(@"right");
|
||||
_hitSlop.top = RNGH_HIT_SLOP_GET(@"top");
|
||||
_hitSlop.bottom = RNGH_HIT_SLOP_GET(@"bottom");
|
||||
_hitSlop.width = RNGH_HIT_SLOP_GET(@"width");
|
||||
_hitSlop.height = RNGH_HIT_SLOP_GET(@"height");
|
||||
if (isnan(_hitSlop.left) && isnan(_hitSlop.right) && !isnan(_hitSlop.width)) {
|
||||
RCTLogError(@"When width is set one of left or right pads need to be defined");
|
||||
}
|
||||
if (!isnan(_hitSlop.width) && !isnan(_hitSlop.left) && !isnan(_hitSlop.right)) {
|
||||
RCTLogError(@"Cannot have all of left, right and width defined");
|
||||
}
|
||||
if (isnan(_hitSlop.top) && isnan(_hitSlop.bottom) && !isnan(_hitSlop.height)) {
|
||||
RCTLogError(@"When height is set one of top or bottom pads need to be defined");
|
||||
}
|
||||
if (!isnan(_hitSlop.height) && !isnan(_hitSlop.top) && !isnan(_hitSlop.bottom)) {
|
||||
RCTLogError(@"Cannot have all of top, bottom and height defined");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setEnabled:(BOOL)enabled
|
||||
{
|
||||
_enabled = enabled;
|
||||
self.recognizer.enabled = enabled;
|
||||
}
|
||||
|
||||
- (void)bindToView:(UIView *)view
|
||||
{
|
||||
view.userInteractionEnabled = YES;
|
||||
self.recognizer.delegate = self;
|
||||
[view addGestureRecognizer:self.recognizer];
|
||||
}
|
||||
|
||||
- (void)unbindFromView
|
||||
{
|
||||
[self.recognizer.view removeGestureRecognizer:self.recognizer];
|
||||
self.recognizer.delegate = nil;
|
||||
}
|
||||
|
||||
- (RNGestureHandlerEventExtraData *)eventExtraData:(UIGestureRecognizer *)recognizer
|
||||
{
|
||||
return [RNGestureHandlerEventExtraData
|
||||
forPosition:[recognizer locationInView:recognizer.view]
|
||||
withAbsolutePosition:[recognizer locationInView:recognizer.view.window]
|
||||
withNumberOfTouches:recognizer.numberOfTouches];
|
||||
}
|
||||
|
||||
- (void)handleGesture:(UIGestureRecognizer *)recognizer
|
||||
{
|
||||
RNGestureHandlerEventExtraData *eventData = [self eventExtraData:recognizer];
|
||||
[self sendEventsInState:self.state forViewWithTag:recognizer.view.reactTag withExtraData:eventData];
|
||||
}
|
||||
|
||||
- (void)sendEventsInState:(RNGestureHandlerState)state
|
||||
forViewWithTag:(nonnull NSNumber *)reactTag
|
||||
withExtraData:(RNGestureHandlerEventExtraData *)extraData
|
||||
{
|
||||
if (state != _lastState) {
|
||||
if (state == RNGestureHandlerStateActive) {
|
||||
// Generate a unique coalescing-key each time the gesture-handler becomes active. All events will have
|
||||
// the same coalescing-key allowing RCTEventDispatcher to coalesce RNGestureHandlerEvents when events are
|
||||
// generated faster than they can be treated by JS thread
|
||||
static uint16_t nextEventCoalescingKey = 0;
|
||||
self->_eventCoalescingKey = nextEventCoalescingKey++;
|
||||
|
||||
} else if (state == RNGestureHandlerStateEnd && _lastState != RNGestureHandlerStateActive) {
|
||||
[self.emitter sendStateChangeEvent:[[RNGestureHandlerStateChange alloc] initWithReactTag:reactTag
|
||||
handlerTag:_tag
|
||||
state:RNGestureHandlerStateActive
|
||||
prevState:_lastState
|
||||
extraData:extraData]];
|
||||
_lastState = RNGestureHandlerStateActive;
|
||||
}
|
||||
id stateEvent = [[RNGestureHandlerStateChange alloc] initWithReactTag:reactTag
|
||||
handlerTag:_tag
|
||||
state:state
|
||||
prevState:_lastState
|
||||
extraData:extraData];
|
||||
[self.emitter sendStateChangeEvent:stateEvent];
|
||||
_lastState = state;
|
||||
}
|
||||
|
||||
if (state == RNGestureHandlerStateActive) {
|
||||
id touchEvent = [[RNGestureHandlerEvent alloc] initWithReactTag:reactTag
|
||||
handlerTag:_tag
|
||||
state:state
|
||||
extraData:extraData
|
||||
coalescingKey:self->_eventCoalescingKey];
|
||||
[self.emitter sendTouchEvent:touchEvent];
|
||||
}
|
||||
}
|
||||
|
||||
- (RNGestureHandlerState)state
|
||||
{
|
||||
switch (_recognizer.state) {
|
||||
case UIGestureRecognizerStateBegan:
|
||||
case UIGestureRecognizerStatePossible:
|
||||
return RNGestureHandlerStateBegan;
|
||||
case UIGestureRecognizerStateEnded:
|
||||
return RNGestureHandlerStateEnd;
|
||||
case UIGestureRecognizerStateFailed:
|
||||
return RNGestureHandlerStateFailed;
|
||||
case UIGestureRecognizerStateCancelled:
|
||||
return RNGestureHandlerStateCancelled;
|
||||
case UIGestureRecognizerStateChanged:
|
||||
return RNGestureHandlerStateActive;
|
||||
}
|
||||
return RNGestureHandlerStateUndetermined;
|
||||
}
|
||||
|
||||
#pragma mark UIGestureRecognizerDelegate
|
||||
|
||||
+ (RNGestureHandler *)findGestureHandlerByRecognizer:(UIGestureRecognizer *)recognizer
|
||||
{
|
||||
RNGestureHandler *handler = recognizer.gestureHandler;
|
||||
if (handler != nil) {
|
||||
return handler;
|
||||
}
|
||||
|
||||
// We may try to extract "DummyGestureHandler" in case when "otherGestureRecognizer" belongs to
|
||||
// a native view being wrapped with "NativeViewGestureHandler"
|
||||
UIView *reactView = recognizer.view;
|
||||
while (reactView != nil && reactView.reactTag == nil) {
|
||||
reactView = reactView.superview;
|
||||
}
|
||||
|
||||
for (UIGestureRecognizer *recognizer in reactView.gestureRecognizers) {
|
||||
if ([recognizer isKindOfClass:[RNDummyGestureRecognizer class]]) {
|
||||
return recognizer.gestureHandler;
|
||||
}
|
||||
}
|
||||
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer
|
||||
shouldBeRequiredToFailByGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer
|
||||
{
|
||||
RNGestureHandler *handler = [RNGestureHandler findGestureHandlerByRecognizer:otherGestureRecognizer];
|
||||
if ([handler isKindOfClass:[RNNativeViewGestureHandler class]]) {
|
||||
for (NSNumber *handlerTag in handler->_handlersToWaitFor) {
|
||||
if ([_tag isEqual:handlerTag]) {
|
||||
return YES;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer
|
||||
shouldRequireFailureOfGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer
|
||||
{
|
||||
if ([_handlersToWaitFor count]) {
|
||||
RNGestureHandler *handler = [RNGestureHandler findGestureHandlerByRecognizer:otherGestureRecognizer];
|
||||
if (handler != nil) {
|
||||
for (NSNumber *handlerTag in _handlersToWaitFor) {
|
||||
if ([handler.tag isEqual:handlerTag]) {
|
||||
return YES;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer
|
||||
shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer
|
||||
{
|
||||
if (_recognizer.state == UIGestureRecognizerStateBegan && _recognizer.state == UIGestureRecognizerStatePossible) {
|
||||
return YES;
|
||||
}
|
||||
if ([_simultaneousHandlers count]) {
|
||||
RNGestureHandler *handler = [RNGestureHandler findGestureHandlerByRecognizer:otherGestureRecognizer];
|
||||
if (handler != nil) {
|
||||
for (NSNumber *handlerTag in _simultaneousHandlers) {
|
||||
if ([handler.tag isEqual:handlerTag]) {
|
||||
return YES;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (void)reset
|
||||
{
|
||||
_lastState = RNGestureHandlerStateUndetermined;
|
||||
}
|
||||
|
||||
- (BOOL)containsPointInView
|
||||
{
|
||||
CGPoint pt = [_recognizer locationInView:_recognizer.view];
|
||||
CGRect hitFrame = RNGHHitSlopInsetRect(_recognizer.view.bounds, _hitSlop);
|
||||
return CGRectContainsPoint(hitFrame, pt);
|
||||
}
|
||||
|
||||
- (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer
|
||||
{
|
||||
if ([_handlersToWaitFor count]) {
|
||||
for (RNGestureHandler *handler in [allGestureHandlers allObjects]) {
|
||||
if (handler != nil
|
||||
&& (handler.state == RNGestureHandlerStateActive || handler->_recognizer.state == UIGestureRecognizerStateBegan)) {
|
||||
for (NSNumber *handlerTag in _handlersToWaitFor) {
|
||||
if ([handler.tag isEqual:handlerTag]) {
|
||||
return NO;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[self reset];
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch
|
||||
{
|
||||
// If hitSlop is set we use it to determine if a given gesture recognizer should start processing
|
||||
// touch stream. This only works for negative values of hitSlop as this method won't be triggered
|
||||
// unless touch startes in the bounds of the attached view. To acheve similar effect with positive
|
||||
// values of hitSlop one should set hitSlop for the underlying view. This limitation is due to the
|
||||
// fact that hitTest method is only available at the level of UIView
|
||||
if (RNGH_HIT_SLOP_IS_SET(_hitSlop)) {
|
||||
CGPoint location = [touch locationInView:gestureRecognizer.view];
|
||||
CGRect hitFrame = RNGHHitSlopInsetRect(gestureRecognizer.view.bounds, _hitSlop);
|
||||
return CGRectContainsPoint(hitFrame, location);
|
||||
}
|
||||
return YES;
|
||||
}
|
||||
|
||||
@end
|
690
node_modules/react-native-gesture-handler/ios/RNGestureHandler.xcodeproj/project.pbxproj
generated
vendored
Normal file
690
node_modules/react-native-gesture-handler/ios/RNGestureHandler.xcodeproj/project.pbxproj
generated
vendored
Normal file
@ -0,0 +1,690 @@
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 46;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
446E7FDE1ED57CA6009282E7 /* RNGestureHandlerModule.m in Sources */ = {isa = PBXBuildFile; fileRef = 446E7FDD1ED57CA6009282E7 /* RNGestureHandlerModule.m */; };
|
||||
446E7FE61ED6E177009282E7 /* RNGestureHandlerModule.h in Headers */ = {isa = PBXBuildFile; fileRef = 446E7FDC1ED57CA6009282E7 /* RNGestureHandlerModule.h */; };
|
||||
446E7FE71ED6E177009282E7 /* RNGestureHandlerState.h in Headers */ = {isa = PBXBuildFile; fileRef = 44384A781ECDE0DB006BAD02 /* RNGestureHandlerState.h */; };
|
||||
446E7FF61ED89A31009282E7 /* RNGestureHandlerEvents.h in Headers */ = {isa = PBXBuildFile; fileRef = 446E7FF51ED89A31009282E7 /* RNGestureHandlerEvents.h */; };
|
||||
446E7FF81ED89A4B009282E7 /* RNGestureHandlerEvents.m in Sources */ = {isa = PBXBuildFile; fileRef = 446E7FF71ED89A4B009282E7 /* RNGestureHandlerEvents.m */; };
|
||||
448802DD1F6803DF00018214 /* RNGestureHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = 448802DB1F6803DF00018214 /* RNGestureHandler.h */; };
|
||||
448802DE1F6803DF00018214 /* RNGestureHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 448802DC1F6803DF00018214 /* RNGestureHandler.m */; };
|
||||
44AEC7111F8F9B6C0086889F /* RNRootViewGestureRecognizer.h in Headers */ = {isa = PBXBuildFile; fileRef = 44AEC7101F8F9B6C0086889F /* RNRootViewGestureRecognizer.h */; };
|
||||
44AEC7131F8F9B770086889F /* RNRootViewGestureRecognizer.m in Sources */ = {isa = PBXBuildFile; fileRef = 44AEC7121F8F9B770086889F /* RNRootViewGestureRecognizer.m */; };
|
||||
44AEC7151F8F9BEF0086889F /* RNGestureHandlerRegistry.h in Headers */ = {isa = PBXBuildFile; fileRef = 44AEC7141F8F9BEF0086889F /* RNGestureHandlerRegistry.h */; };
|
||||
44AEC7171F8F9C090086889F /* RNGestureHandlerRegistry.m in Sources */ = {isa = PBXBuildFile; fileRef = 44AEC7161F8F9C090086889F /* RNGestureHandlerRegistry.m */; };
|
||||
44AEC71F1F8FA0700086889F /* RNGestureHandlerButton.h in Headers */ = {isa = PBXBuildFile; fileRef = 44AEC71D1F8FA0700086889F /* RNGestureHandlerButton.h */; };
|
||||
44AEC7201F8FA0700086889F /* RNGestureHandlerButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 44AEC71E1F8FA0700086889F /* RNGestureHandlerButton.m */; };
|
||||
44AEC72F1F8FA1270086889F /* RNLongPressHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = 44AEC7231F8FA1270086889F /* RNLongPressHandler.h */; };
|
||||
44AEC7301F8FA1270086889F /* RNLongPressHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 44AEC7241F8FA1270086889F /* RNLongPressHandler.m */; };
|
||||
44AEC7311F8FA1270086889F /* RNNativeViewHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = 44AEC7251F8FA1270086889F /* RNNativeViewHandler.h */; };
|
||||
44AEC7321F8FA1270086889F /* RNNativeViewHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 44AEC7261F8FA1270086889F /* RNNativeViewHandler.m */; };
|
||||
44AEC7331F8FA1270086889F /* RNPanHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = 44AEC7271F8FA1270086889F /* RNPanHandler.h */; };
|
||||
44AEC7341F8FA1270086889F /* RNPanHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 44AEC7281F8FA1270086889F /* RNPanHandler.m */; };
|
||||
44AEC7351F8FA1270086889F /* RNPinchHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = 44AEC7291F8FA1270086889F /* RNPinchHandler.h */; };
|
||||
44AEC7361F8FA1270086889F /* RNPinchHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 44AEC72A1F8FA1270086889F /* RNPinchHandler.m */; };
|
||||
44AEC7371F8FA1270086889F /* RNRotationHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = 44AEC72B1F8FA1270086889F /* RNRotationHandler.h */; };
|
||||
44AEC7381F8FA1270086889F /* RNRotationHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 44AEC72C1F8FA1270086889F /* RNRotationHandler.m */; };
|
||||
44AEC7391F8FA1270086889F /* RNTapHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = 44AEC72D1F8FA1270086889F /* RNTapHandler.h */; };
|
||||
44AEC73A1F8FA1270086889F /* RNTapHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 44AEC72E1F8FA1270086889F /* RNTapHandler.m */; };
|
||||
44BE34481F1E1AAA008679D1 /* RNGestureHandlerManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 44BE34471F1E1AAA008679D1 /* RNGestureHandlerManager.m */; };
|
||||
44BE344A1F1E1ABA008679D1 /* RNGestureHandlerManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 44BE34491F1E1ABA008679D1 /* RNGestureHandlerManager.h */; };
|
||||
660F46742080D8F700B7B50D /* RNGestureHandlerDirection.h in Headers */ = {isa = PBXBuildFile; fileRef = 660F46732080D8F600B7B50D /* RNGestureHandlerDirection.h */; };
|
||||
668E083C21BDD70900EDDF40 /* RNForceTouchHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = 668E083A21BDD70900EDDF40 /* RNForceTouchHandler.h */; };
|
||||
668E083D21BDD70900EDDF40 /* RNForceTouchHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 668E083B21BDD70900EDDF40 /* RNForceTouchHandler.m */; };
|
||||
66A291D5207D032400809C27 /* RNFlingHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 66A291D3207D032400809C27 /* RNFlingHandler.m */; };
|
||||
66A291D6207D032400809C27 /* RNFlingHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = 66A291D4207D032400809C27 /* RNFlingHandler.h */; };
|
||||
B5C32A0E220C603B000FFB8D /* RNGestureHandlerButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 44AEC71E1F8FA0700086889F /* RNGestureHandlerButton.m */; };
|
||||
B5C32A0F220C603B000FFB8D /* RNForceTouchHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 668E083B21BDD70900EDDF40 /* RNForceTouchHandler.m */; };
|
||||
B5C32A10220C603B000FFB8D /* RNGestureHandlerManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 44BE34471F1E1AAA008679D1 /* RNGestureHandlerManager.m */; };
|
||||
B5C32A11220C603B000FFB8D /* RNLongPressHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 44AEC7241F8FA1270086889F /* RNLongPressHandler.m */; };
|
||||
B5C32A12220C603B000FFB8D /* RNGestureHandlerEvents.m in Sources */ = {isa = PBXBuildFile; fileRef = 446E7FF71ED89A4B009282E7 /* RNGestureHandlerEvents.m */; };
|
||||
B5C32A13220C603B000FFB8D /* RNPanHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 44AEC7281F8FA1270086889F /* RNPanHandler.m */; };
|
||||
B5C32A14220C603B000FFB8D /* RNGestureHandlerRegistry.m in Sources */ = {isa = PBXBuildFile; fileRef = 44AEC7161F8F9C090086889F /* RNGestureHandlerRegistry.m */; };
|
||||
B5C32A15220C603B000FFB8D /* RNGestureHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 448802DC1F6803DF00018214 /* RNGestureHandler.m */; };
|
||||
B5C32A16220C603B000FFB8D /* RNTapHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 44AEC72E1F8FA1270086889F /* RNTapHandler.m */; };
|
||||
B5C32A17220C603B000FFB8D /* RNGestureHandlerModule.m in Sources */ = {isa = PBXBuildFile; fileRef = 446E7FDD1ED57CA6009282E7 /* RNGestureHandlerModule.m */; };
|
||||
B5C32A18220C603B000FFB8D /* RNRotationHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 44AEC72C1F8FA1270086889F /* RNRotationHandler.m */; };
|
||||
B5C32A19220C603B000FFB8D /* RNNativeViewHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 44AEC7261F8FA1270086889F /* RNNativeViewHandler.m */; };
|
||||
B5C32A1A220C603B000FFB8D /* RNRootViewGestureRecognizer.m in Sources */ = {isa = PBXBuildFile; fileRef = 44AEC7121F8F9B770086889F /* RNRootViewGestureRecognizer.m */; };
|
||||
B5C32A1B220C603B000FFB8D /* RNFlingHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 66A291D3207D032400809C27 /* RNFlingHandler.m */; };
|
||||
B5C32A1C220C603B000FFB8D /* RNPinchHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 44AEC72A1F8FA1270086889F /* RNPinchHandler.m */; };
|
||||
B5C32A1E220C603B000FFB8D /* RNForceTouchHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = 668E083A21BDD70900EDDF40 /* RNForceTouchHandler.h */; };
|
||||
B5C32A1F220C603B000FFB8D /* RNFlingHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = 66A291D4207D032400809C27 /* RNFlingHandler.h */; };
|
||||
B5C32A20220C603B000FFB8D /* RNLongPressHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = 44AEC7231F8FA1270086889F /* RNLongPressHandler.h */; };
|
||||
B5C32A21220C603B000FFB8D /* RNGestureHandlerModule.h in Headers */ = {isa = PBXBuildFile; fileRef = 446E7FDC1ED57CA6009282E7 /* RNGestureHandlerModule.h */; };
|
||||
B5C32A22220C603B000FFB8D /* RNPinchHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = 44AEC7291F8FA1270086889F /* RNPinchHandler.h */; };
|
||||
B5C32A23220C603B000FFB8D /* RNGestureHandlerRegistry.h in Headers */ = {isa = PBXBuildFile; fileRef = 44AEC7141F8F9BEF0086889F /* RNGestureHandlerRegistry.h */; };
|
||||
B5C32A24220C603B000FFB8D /* RNGestureHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = 448802DB1F6803DF00018214 /* RNGestureHandler.h */; };
|
||||
B5C32A25220C603B000FFB8D /* RNRotationHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = 44AEC72B1F8FA1270086889F /* RNRotationHandler.h */; };
|
||||
B5C32A26220C603B000FFB8D /* RNPanHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = 44AEC7271F8FA1270086889F /* RNPanHandler.h */; };
|
||||
B5C32A27220C603B000FFB8D /* RNGestureHandlerManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 44BE34491F1E1ABA008679D1 /* RNGestureHandlerManager.h */; };
|
||||
B5C32A28220C603B000FFB8D /* RNGestureHandlerEvents.h in Headers */ = {isa = PBXBuildFile; fileRef = 446E7FF51ED89A31009282E7 /* RNGestureHandlerEvents.h */; };
|
||||
B5C32A29220C603B000FFB8D /* RNTapHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = 44AEC72D1F8FA1270086889F /* RNTapHandler.h */; };
|
||||
B5C32A2A220C603B000FFB8D /* RNRootViewGestureRecognizer.h in Headers */ = {isa = PBXBuildFile; fileRef = 44AEC7101F8F9B6C0086889F /* RNRootViewGestureRecognizer.h */; };
|
||||
B5C32A2B220C603B000FFB8D /* RNNativeViewHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = 44AEC7251F8FA1270086889F /* RNNativeViewHandler.h */; };
|
||||
B5C32A2C220C603B000FFB8D /* RNGestureHandlerState.h in Headers */ = {isa = PBXBuildFile; fileRef = 44384A781ECDE0DB006BAD02 /* RNGestureHandlerState.h */; };
|
||||
B5C32A2D220C603B000FFB8D /* RNGestureHandlerButton.h in Headers */ = {isa = PBXBuildFile; fileRef = 44AEC71D1F8FA0700086889F /* RNGestureHandlerButton.h */; };
|
||||
B5C32A2E220C603B000FFB8D /* RNGestureHandlerDirection.h in Headers */ = {isa = PBXBuildFile; fileRef = 660F46732080D8F600B7B50D /* RNGestureHandlerDirection.h */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
58B511D91A9E6C8500147676 /* CopyFiles */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
dstPath = "include/$(PRODUCT_NAME)";
|
||||
dstSubfolderSpec = 16;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
B5C32A30220C603B000FFB8D /* CopyFiles */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
dstPath = "include/$(PRODUCT_NAME)";
|
||||
dstSubfolderSpec = 16;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
134814201AA4EA6300B7C361 /* libRNGestureHandler.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRNGestureHandler.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
44384A781ECDE0DB006BAD02 /* RNGestureHandlerState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNGestureHandlerState.h; sourceTree = "<group>"; };
|
||||
446E7FDC1ED57CA6009282E7 /* RNGestureHandlerModule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNGestureHandlerModule.h; sourceTree = "<group>"; };
|
||||
446E7FDD1ED57CA6009282E7 /* RNGestureHandlerModule.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNGestureHandlerModule.m; sourceTree = "<group>"; };
|
||||
446E7FF51ED89A31009282E7 /* RNGestureHandlerEvents.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNGestureHandlerEvents.h; sourceTree = "<group>"; };
|
||||
446E7FF71ED89A4B009282E7 /* RNGestureHandlerEvents.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNGestureHandlerEvents.m; sourceTree = "<group>"; };
|
||||
448802DB1F6803DF00018214 /* RNGestureHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNGestureHandler.h; sourceTree = "<group>"; };
|
||||
448802DC1F6803DF00018214 /* RNGestureHandler.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNGestureHandler.m; sourceTree = "<group>"; };
|
||||
44AEC7101F8F9B6C0086889F /* RNRootViewGestureRecognizer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNRootViewGestureRecognizer.h; sourceTree = "<group>"; };
|
||||
44AEC7121F8F9B770086889F /* RNRootViewGestureRecognizer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNRootViewGestureRecognizer.m; sourceTree = "<group>"; };
|
||||
44AEC7141F8F9BEF0086889F /* RNGestureHandlerRegistry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNGestureHandlerRegistry.h; sourceTree = "<group>"; };
|
||||
44AEC7161F8F9C090086889F /* RNGestureHandlerRegistry.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNGestureHandlerRegistry.m; sourceTree = "<group>"; };
|
||||
44AEC71D1F8FA0700086889F /* RNGestureHandlerButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNGestureHandlerButton.h; sourceTree = "<group>"; };
|
||||
44AEC71E1F8FA0700086889F /* RNGestureHandlerButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNGestureHandlerButton.m; sourceTree = "<group>"; };
|
||||
44AEC7231F8FA1270086889F /* RNLongPressHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RNLongPressHandler.h; path = Handlers/RNLongPressHandler.h; sourceTree = "<group>"; };
|
||||
44AEC7241F8FA1270086889F /* RNLongPressHandler.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = RNLongPressHandler.m; path = Handlers/RNLongPressHandler.m; sourceTree = "<group>"; };
|
||||
44AEC7251F8FA1270086889F /* RNNativeViewHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RNNativeViewHandler.h; path = Handlers/RNNativeViewHandler.h; sourceTree = "<group>"; };
|
||||
44AEC7261F8FA1270086889F /* RNNativeViewHandler.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = RNNativeViewHandler.m; path = Handlers/RNNativeViewHandler.m; sourceTree = "<group>"; };
|
||||
44AEC7271F8FA1270086889F /* RNPanHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RNPanHandler.h; path = Handlers/RNPanHandler.h; sourceTree = "<group>"; };
|
||||
44AEC7281F8FA1270086889F /* RNPanHandler.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = RNPanHandler.m; path = Handlers/RNPanHandler.m; sourceTree = "<group>"; };
|
||||
44AEC7291F8FA1270086889F /* RNPinchHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RNPinchHandler.h; path = Handlers/RNPinchHandler.h; sourceTree = "<group>"; };
|
||||
44AEC72A1F8FA1270086889F /* RNPinchHandler.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = RNPinchHandler.m; path = Handlers/RNPinchHandler.m; sourceTree = "<group>"; };
|
||||
44AEC72B1F8FA1270086889F /* RNRotationHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RNRotationHandler.h; path = Handlers/RNRotationHandler.h; sourceTree = "<group>"; };
|
||||
44AEC72C1F8FA1270086889F /* RNRotationHandler.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = RNRotationHandler.m; path = Handlers/RNRotationHandler.m; sourceTree = "<group>"; };
|
||||
44AEC72D1F8FA1270086889F /* RNTapHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RNTapHandler.h; path = Handlers/RNTapHandler.h; sourceTree = "<group>"; };
|
||||
44AEC72E1F8FA1270086889F /* RNTapHandler.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = RNTapHandler.m; path = Handlers/RNTapHandler.m; sourceTree = "<group>"; };
|
||||
44BE34471F1E1AAA008679D1 /* RNGestureHandlerManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNGestureHandlerManager.m; sourceTree = "<group>"; };
|
||||
44BE34491F1E1ABA008679D1 /* RNGestureHandlerManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNGestureHandlerManager.h; sourceTree = "<group>"; };
|
||||
660F46732080D8F600B7B50D /* RNGestureHandlerDirection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNGestureHandlerDirection.h; sourceTree = "<group>"; };
|
||||
668E083A21BDD70900EDDF40 /* RNForceTouchHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RNForceTouchHandler.h; path = Handlers/RNForceTouchHandler.h; sourceTree = "<group>"; };
|
||||
668E083B21BDD70900EDDF40 /* RNForceTouchHandler.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = RNForceTouchHandler.m; path = Handlers/RNForceTouchHandler.m; sourceTree = "<group>"; };
|
||||
66A291D3207D032400809C27 /* RNFlingHandler.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = RNFlingHandler.m; path = Handlers/RNFlingHandler.m; sourceTree = "<group>"; };
|
||||
66A291D4207D032400809C27 /* RNFlingHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RNFlingHandler.h; path = Handlers/RNFlingHandler.h; sourceTree = "<group>"; };
|
||||
B5C32A36220C603B000FFB8D /* libRNGestureHandler-tvOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libRNGestureHandler-tvOS.a"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
58B511D81A9E6C8500147676 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
B5C32A2F220C603B000FFB8D /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
134814211AA4EA7D00B7C361 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
134814201AA4EA6300B7C361 /* libRNGestureHandler.a */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
44AEC7221F8FA1150086889F /* Handlers */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
668E083A21BDD70900EDDF40 /* RNForceTouchHandler.h */,
|
||||
668E083B21BDD70900EDDF40 /* RNForceTouchHandler.m */,
|
||||
66A291D4207D032400809C27 /* RNFlingHandler.h */,
|
||||
66A291D3207D032400809C27 /* RNFlingHandler.m */,
|
||||
44AEC7231F8FA1270086889F /* RNLongPressHandler.h */,
|
||||
44AEC7241F8FA1270086889F /* RNLongPressHandler.m */,
|
||||
44AEC7251F8FA1270086889F /* RNNativeViewHandler.h */,
|
||||
44AEC7261F8FA1270086889F /* RNNativeViewHandler.m */,
|
||||
44AEC7271F8FA1270086889F /* RNPanHandler.h */,
|
||||
44AEC7281F8FA1270086889F /* RNPanHandler.m */,
|
||||
44AEC7291F8FA1270086889F /* RNPinchHandler.h */,
|
||||
44AEC72A1F8FA1270086889F /* RNPinchHandler.m */,
|
||||
44AEC72B1F8FA1270086889F /* RNRotationHandler.h */,
|
||||
44AEC72C1F8FA1270086889F /* RNRotationHandler.m */,
|
||||
44AEC72D1F8FA1270086889F /* RNTapHandler.h */,
|
||||
44AEC72E1F8FA1270086889F /* RNTapHandler.m */,
|
||||
);
|
||||
name = Handlers;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
58B511D21A9E6C8500147676 = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
660F46732080D8F600B7B50D /* RNGestureHandlerDirection.h */,
|
||||
44AEC7221F8FA1150086889F /* Handlers */,
|
||||
44AEC7161F8F9C090086889F /* RNGestureHandlerRegistry.m */,
|
||||
44AEC7141F8F9BEF0086889F /* RNGestureHandlerRegistry.h */,
|
||||
44AEC7121F8F9B770086889F /* RNRootViewGestureRecognizer.m */,
|
||||
44AEC7101F8F9B6C0086889F /* RNRootViewGestureRecognizer.h */,
|
||||
448802DB1F6803DF00018214 /* RNGestureHandler.h */,
|
||||
448802DC1F6803DF00018214 /* RNGestureHandler.m */,
|
||||
44BE34491F1E1ABA008679D1 /* RNGestureHandlerManager.h */,
|
||||
44BE34471F1E1AAA008679D1 /* RNGestureHandlerManager.m */,
|
||||
446E7FF71ED89A4B009282E7 /* RNGestureHandlerEvents.m */,
|
||||
446E7FF51ED89A31009282E7 /* RNGestureHandlerEvents.h */,
|
||||
446E7FDC1ED57CA6009282E7 /* RNGestureHandlerModule.h */,
|
||||
446E7FDD1ED57CA6009282E7 /* RNGestureHandlerModule.m */,
|
||||
44384A781ECDE0DB006BAD02 /* RNGestureHandlerState.h */,
|
||||
44AEC71D1F8FA0700086889F /* RNGestureHandlerButton.h */,
|
||||
44AEC71E1F8FA0700086889F /* RNGestureHandlerButton.m */,
|
||||
134814211AA4EA7D00B7C361 /* Products */,
|
||||
B5C32A36220C603B000FFB8D /* libRNGestureHandler-tvOS.a */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXHeadersBuildPhase section */
|
||||
446E7FE51ED6DBD8009282E7 /* Headers */ = {
|
||||
isa = PBXHeadersBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
668E083C21BDD70900EDDF40 /* RNForceTouchHandler.h in Headers */,
|
||||
66A291D6207D032400809C27 /* RNFlingHandler.h in Headers */,
|
||||
44AEC72F1F8FA1270086889F /* RNLongPressHandler.h in Headers */,
|
||||
446E7FE61ED6E177009282E7 /* RNGestureHandlerModule.h in Headers */,
|
||||
44AEC7351F8FA1270086889F /* RNPinchHandler.h in Headers */,
|
||||
44AEC7151F8F9BEF0086889F /* RNGestureHandlerRegistry.h in Headers */,
|
||||
448802DD1F6803DF00018214 /* RNGestureHandler.h in Headers */,
|
||||
44AEC7371F8FA1270086889F /* RNRotationHandler.h in Headers */,
|
||||
44AEC7331F8FA1270086889F /* RNPanHandler.h in Headers */,
|
||||
44BE344A1F1E1ABA008679D1 /* RNGestureHandlerManager.h in Headers */,
|
||||
446E7FF61ED89A31009282E7 /* RNGestureHandlerEvents.h in Headers */,
|
||||
44AEC7391F8FA1270086889F /* RNTapHandler.h in Headers */,
|
||||
44AEC7111F8F9B6C0086889F /* RNRootViewGestureRecognizer.h in Headers */,
|
||||
44AEC7311F8FA1270086889F /* RNNativeViewHandler.h in Headers */,
|
||||
446E7FE71ED6E177009282E7 /* RNGestureHandlerState.h in Headers */,
|
||||
44AEC71F1F8FA0700086889F /* RNGestureHandlerButton.h in Headers */,
|
||||
660F46742080D8F700B7B50D /* RNGestureHandlerDirection.h in Headers */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
B5C32A1D220C603B000FFB8D /* Headers */ = {
|
||||
isa = PBXHeadersBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
B5C32A1E220C603B000FFB8D /* RNForceTouchHandler.h in Headers */,
|
||||
B5C32A1F220C603B000FFB8D /* RNFlingHandler.h in Headers */,
|
||||
B5C32A20220C603B000FFB8D /* RNLongPressHandler.h in Headers */,
|
||||
B5C32A21220C603B000FFB8D /* RNGestureHandlerModule.h in Headers */,
|
||||
B5C32A22220C603B000FFB8D /* RNPinchHandler.h in Headers */,
|
||||
B5C32A23220C603B000FFB8D /* RNGestureHandlerRegistry.h in Headers */,
|
||||
B5C32A24220C603B000FFB8D /* RNGestureHandler.h in Headers */,
|
||||
B5C32A25220C603B000FFB8D /* RNRotationHandler.h in Headers */,
|
||||
B5C32A26220C603B000FFB8D /* RNPanHandler.h in Headers */,
|
||||
B5C32A27220C603B000FFB8D /* RNGestureHandlerManager.h in Headers */,
|
||||
B5C32A28220C603B000FFB8D /* RNGestureHandlerEvents.h in Headers */,
|
||||
B5C32A29220C603B000FFB8D /* RNTapHandler.h in Headers */,
|
||||
B5C32A2A220C603B000FFB8D /* RNRootViewGestureRecognizer.h in Headers */,
|
||||
B5C32A2B220C603B000FFB8D /* RNNativeViewHandler.h in Headers */,
|
||||
B5C32A2C220C603B000FFB8D /* RNGestureHandlerState.h in Headers */,
|
||||
B5C32A2D220C603B000FFB8D /* RNGestureHandlerButton.h in Headers */,
|
||||
B5C32A2E220C603B000FFB8D /* RNGestureHandlerDirection.h in Headers */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXHeadersBuildPhase section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
58B511DA1A9E6C8500147676 /* RNGestureHandler */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "RNGestureHandler" */;
|
||||
buildPhases = (
|
||||
58B511D71A9E6C8500147676 /* Sources */,
|
||||
446E7FE51ED6DBD8009282E7 /* Headers */,
|
||||
58B511D81A9E6C8500147676 /* Frameworks */,
|
||||
58B511D91A9E6C8500147676 /* CopyFiles */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = RNGestureHandler;
|
||||
productName = RCTDataManager;
|
||||
productReference = 134814201AA4EA6300B7C361 /* libRNGestureHandler.a */;
|
||||
productType = "com.apple.product-type.library.static";
|
||||
};
|
||||
B5C32A0C220C603B000FFB8D /* RNGestureHandler-tvOS */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = B5C32A31220C603B000FFB8D /* Build configuration list for PBXNativeTarget "RNGestureHandler-tvOS" */;
|
||||
buildPhases = (
|
||||
B5C32A0D220C603B000FFB8D /* Sources */,
|
||||
B5C32A1D220C603B000FFB8D /* Headers */,
|
||||
B5C32A2F220C603B000FFB8D /* Frameworks */,
|
||||
B5C32A30220C603B000FFB8D /* CopyFiles */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = "RNGestureHandler-tvOS";
|
||||
productName = RCTDataManager;
|
||||
productReference = B5C32A36220C603B000FFB8D /* libRNGestureHandler-tvOS.a */;
|
||||
productType = "com.apple.product-type.library.static";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
58B511D31A9E6C8500147676 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 610;
|
||||
ORGANIZATIONNAME = "Software Mansion";
|
||||
TargetAttributes = {
|
||||
58B511DA1A9E6C8500147676 = {
|
||||
CreatedOnToolsVersion = 6.1.1;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "RNGestureHandler" */;
|
||||
compatibilityVersion = "Xcode 3.2";
|
||||
developmentRegion = English;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
);
|
||||
mainGroup = 58B511D21A9E6C8500147676;
|
||||
productRefGroup = 58B511D21A9E6C8500147676;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
58B511DA1A9E6C8500147676 /* RNGestureHandler */,
|
||||
B5C32A0C220C603B000FFB8D /* RNGestureHandler-tvOS */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
58B511D71A9E6C8500147676 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
44AEC7201F8FA0700086889F /* RNGestureHandlerButton.m in Sources */,
|
||||
668E083D21BDD70900EDDF40 /* RNForceTouchHandler.m in Sources */,
|
||||
44BE34481F1E1AAA008679D1 /* RNGestureHandlerManager.m in Sources */,
|
||||
44AEC7301F8FA1270086889F /* RNLongPressHandler.m in Sources */,
|
||||
446E7FF81ED89A4B009282E7 /* RNGestureHandlerEvents.m in Sources */,
|
||||
44AEC7341F8FA1270086889F /* RNPanHandler.m in Sources */,
|
||||
44AEC7171F8F9C090086889F /* RNGestureHandlerRegistry.m in Sources */,
|
||||
448802DE1F6803DF00018214 /* RNGestureHandler.m in Sources */,
|
||||
44AEC73A1F8FA1270086889F /* RNTapHandler.m in Sources */,
|
||||
446E7FDE1ED57CA6009282E7 /* RNGestureHandlerModule.m in Sources */,
|
||||
44AEC7381F8FA1270086889F /* RNRotationHandler.m in Sources */,
|
||||
44AEC7321F8FA1270086889F /* RNNativeViewHandler.m in Sources */,
|
||||
44AEC7131F8F9B770086889F /* RNRootViewGestureRecognizer.m in Sources */,
|
||||
66A291D5207D032400809C27 /* RNFlingHandler.m in Sources */,
|
||||
44AEC7361F8FA1270086889F /* RNPinchHandler.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
B5C32A0D220C603B000FFB8D /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
B5C32A0E220C603B000FFB8D /* RNGestureHandlerButton.m in Sources */,
|
||||
B5C32A0F220C603B000FFB8D /* RNForceTouchHandler.m in Sources */,
|
||||
B5C32A10220C603B000FFB8D /* RNGestureHandlerManager.m in Sources */,
|
||||
B5C32A11220C603B000FFB8D /* RNLongPressHandler.m in Sources */,
|
||||
B5C32A12220C603B000FFB8D /* RNGestureHandlerEvents.m in Sources */,
|
||||
B5C32A13220C603B000FFB8D /* RNPanHandler.m in Sources */,
|
||||
B5C32A14220C603B000FFB8D /* RNGestureHandlerRegistry.m in Sources */,
|
||||
B5C32A15220C603B000FFB8D /* RNGestureHandler.m in Sources */,
|
||||
B5C32A16220C603B000FFB8D /* RNTapHandler.m in Sources */,
|
||||
B5C32A17220C603B000FFB8D /* RNGestureHandlerModule.m in Sources */,
|
||||
B5C32A18220C603B000FFB8D /* RNRotationHandler.m in Sources */,
|
||||
B5C32A19220C603B000FFB8D /* RNNativeViewHandler.m in Sources */,
|
||||
B5C32A1A220C603B000FFB8D /* RNRootViewGestureRecognizer.m in Sources */,
|
||||
B5C32A1B220C603B000FFB8D /* RNFlingHandler.m in Sources */,
|
||||
B5C32A1C220C603B000FFB8D /* RNPinchHandler.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
3C75380331224952A9D19739 /* Testflight */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
||||
"$(SRCROOT)/../../../React/**",
|
||||
"$(SRCROOT)/../../react-native/React/**",
|
||||
);
|
||||
LIBRARY_SEARCH_PATHS = "$(inherited)";
|
||||
OTHER_LDFLAGS = "-ObjC";
|
||||
PRODUCT_NAME = RNGestureHandler;
|
||||
SKIP_INSTALL = YES;
|
||||
};
|
||||
name = Testflight;
|
||||
};
|
||||
58B511ED1A9E6C8500147676 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
58B511EE1A9E6C8500147676 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
COPY_PHASE_STRIP = YES;
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = iphoneos;
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
58B511F01A9E6C8500147676 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
||||
"$(SRCROOT)/../../../React/**",
|
||||
"$(SRCROOT)/../../react-native/React/**",
|
||||
);
|
||||
LIBRARY_SEARCH_PATHS = "$(inherited)";
|
||||
OTHER_LDFLAGS = "-ObjC";
|
||||
PRODUCT_NAME = RNGestureHandler;
|
||||
SKIP_INSTALL = YES;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
58B511F11A9E6C8500147676 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
||||
"$(SRCROOT)/../../../React/**",
|
||||
"$(SRCROOT)/../../react-native/React/**",
|
||||
);
|
||||
LIBRARY_SEARCH_PATHS = "$(inherited)";
|
||||
OTHER_LDFLAGS = "-ObjC";
|
||||
PRODUCT_NAME = RNGestureHandler;
|
||||
SKIP_INSTALL = YES;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
64C7ABFB934A41BFB09378ED /* Testflight */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
COPY_PHASE_STRIP = YES;
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = iphoneos;
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
name = Testflight;
|
||||
};
|
||||
6E1E231AAE4C4EB5B94B5418 /* Testflight */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
COPY_PHASE_STRIP = YES;
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = iphoneos;
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
name = Testflight;
|
||||
};
|
||||
8F4E4CFC1C3048678D76E403 /* Testflight */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
||||
"$(SRCROOT)/../../../React/**",
|
||||
"$(SRCROOT)/../../react-native/React/**",
|
||||
);
|
||||
LIBRARY_SEARCH_PATHS = "$(inherited)";
|
||||
OTHER_LDFLAGS = "-ObjC";
|
||||
PRODUCT_NAME = RNGestureHandler;
|
||||
SKIP_INSTALL = YES;
|
||||
};
|
||||
name = Testflight;
|
||||
};
|
||||
B5C32A32220C603B000FFB8D /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
||||
"$(SRCROOT)/../../../React/**",
|
||||
"$(SRCROOT)/../../react-native/React/**",
|
||||
);
|
||||
LIBRARY_SEARCH_PATHS = "$(inherited)";
|
||||
OTHER_LDFLAGS = "-ObjC";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = appletvos;
|
||||
SKIP_INSTALL = YES;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
B5C32A33220C603B000FFB8D /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
||||
"$(SRCROOT)/../../../React/**",
|
||||
"$(SRCROOT)/../../react-native/React/**",
|
||||
);
|
||||
LIBRARY_SEARCH_PATHS = "$(inherited)";
|
||||
OTHER_LDFLAGS = "-ObjC";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = appletvos;
|
||||
SKIP_INSTALL = YES;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
B5C32A34220C603B000FFB8D /* Testflight */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
||||
"$(SRCROOT)/../../../React/**",
|
||||
"$(SRCROOT)/../../react-native/React/**",
|
||||
);
|
||||
LIBRARY_SEARCH_PATHS = "$(inherited)";
|
||||
OTHER_LDFLAGS = "-ObjC";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = appletvos;
|
||||
SKIP_INSTALL = YES;
|
||||
};
|
||||
name = Testflight;
|
||||
};
|
||||
B5C32A35220C603B000FFB8D /* Testflight */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
||||
"$(SRCROOT)/../../../React/**",
|
||||
"$(SRCROOT)/../../react-native/React/**",
|
||||
);
|
||||
LIBRARY_SEARCH_PATHS = "$(inherited)";
|
||||
OTHER_LDFLAGS = "-ObjC";
|
||||
PRODUCT_NAME = RNGestureHandler;
|
||||
SKIP_INSTALL = YES;
|
||||
};
|
||||
name = Testflight;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "RNGestureHandler" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
58B511ED1A9E6C8500147676 /* Debug */,
|
||||
58B511EE1A9E6C8500147676 /* Release */,
|
||||
6E1E231AAE4C4EB5B94B5418 /* Testflight */,
|
||||
64C7ABFB934A41BFB09378ED /* Testflight */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "RNGestureHandler" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
58B511F01A9E6C8500147676 /* Debug */,
|
||||
58B511F11A9E6C8500147676 /* Release */,
|
||||
3C75380331224952A9D19739 /* Testflight */,
|
||||
8F4E4CFC1C3048678D76E403 /* Testflight */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
B5C32A31220C603B000FFB8D /* Build configuration list for PBXNativeTarget "RNGestureHandler-tvOS" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
B5C32A32220C603B000FFB8D /* Debug */,
|
||||
B5C32A33220C603B000FFB8D /* Release */,
|
||||
B5C32A34220C603B000FFB8D /* Testflight */,
|
||||
B5C32A35220C603B000FFB8D /* Testflight */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 58B511D31A9E6C8500147676 /* Project object */;
|
||||
}
|
18
node_modules/react-native-gesture-handler/ios/RNGestureHandlerButton.h
generated
vendored
Normal file
18
node_modules/react-native-gesture-handler/ios/RNGestureHandlerButton.h
generated
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
//
|
||||
// RNGestureHandlerButton.h
|
||||
// RNGestureHandler
|
||||
//
|
||||
// Created by Krzysztof Magiera on 12/10/2017.
|
||||
// Copyright © 2017 Software Mansion. All rights reserved.
|
||||
//
|
||||
|
||||
#import "RNGestureHandler.h"
|
||||
|
||||
@interface RNGestureHandlerButton : UIControl
|
||||
|
||||
/**
|
||||
* Insets used when hit testing inside this view.
|
||||
*/
|
||||
@property (nonatomic, assign) UIEdgeInsets hitTestEdgeInsets;
|
||||
|
||||
@end
|
70
node_modules/react-native-gesture-handler/ios/RNGestureHandlerButton.m
generated
vendored
Normal file
70
node_modules/react-native-gesture-handler/ios/RNGestureHandlerButton.m
generated
vendored
Normal file
@ -0,0 +1,70 @@
|
||||
//
|
||||
// RNGestureHandlerButton.m
|
||||
// RNGestureHandler
|
||||
//
|
||||
// Created by Krzysztof Magiera on 12/10/2017.
|
||||
// Copyright © 2017 Software Mansion. All rights reserved.
|
||||
//
|
||||
|
||||
#import "RNGestureHandlerButton.h"
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
/**
|
||||
* Gesture Handler Button components overrides standard mechanism used by RN
|
||||
* to determine touch target, which normally would reurn the UIView that is placed
|
||||
* as the deepest element in the view hierarchy.
|
||||
* It's done this way as it allows for the actual target determination to run in JS
|
||||
* where we can travers up the view ierarchy to find first element that want to became
|
||||
* JS responder.
|
||||
*
|
||||
* Since we want to use native button (or actually a `UIControl`) we need to determine
|
||||
* the target in native. This makes it impossible for JS responder based components to
|
||||
* function as a subviews of the button component. Here we override `hitTest:withEvent:`
|
||||
* method and we only determine the target to be either a subclass of `UIControl` or a
|
||||
* view that has gesture recognizers registered.
|
||||
*
|
||||
* This "default" behaviour of target determinator should be sufficient in most of the
|
||||
* cases as in fact it is not that common UI pattern to have many nested buttons (usually
|
||||
* there are just two levels e.g. when you have clickable table cells with additional
|
||||
* buttons). In cases when the default behaviour is insufficient it is recommended to use
|
||||
* `TapGestureHandler` instead of a button which gives much better flexibility as far as
|
||||
* controlling the touch flow.
|
||||
*/
|
||||
@implementation RNGestureHandlerButton
|
||||
|
||||
- (instancetype)init
|
||||
{
|
||||
self = [super init];
|
||||
if (self) {
|
||||
_hitTestEdgeInsets = UIEdgeInsetsZero;
|
||||
#if !TARGET_OS_TV
|
||||
[self setExclusiveTouch:YES];
|
||||
#endif
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (BOOL)shouldHandleTouch:(UIView *)view
|
||||
{
|
||||
return [view isKindOfClass:[UIControl class]] || [view.gestureRecognizers count] > 0;
|
||||
}
|
||||
|
||||
- (BOOL)pointInside:(CGPoint)point withEvent:(UIEvent *)event
|
||||
{
|
||||
if (UIEdgeInsetsEqualToEdgeInsets(self.hitTestEdgeInsets, UIEdgeInsetsZero)) {
|
||||
return [super pointInside:point withEvent:event];
|
||||
}
|
||||
CGRect hitFrame = UIEdgeInsetsInsetRect(self.bounds, self.hitTestEdgeInsets);
|
||||
return CGRectContainsPoint(hitFrame, point);
|
||||
}
|
||||
|
||||
- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event
|
||||
{
|
||||
UIView *inner = [super hitTest:point withEvent:event];
|
||||
while (inner && ![self shouldHandleTouch:inner]) inner = inner.superview;
|
||||
return inner;
|
||||
}
|
||||
|
||||
@end
|
||||
|
8
node_modules/react-native-gesture-handler/ios/RNGestureHandlerDirection.h
generated
vendored
Normal file
8
node_modules/react-native-gesture-handler/ios/RNGestureHandlerDirection.h
generated
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
typedef NS_ENUM(NSInteger, RNGestureHandlerDirection) {
|
||||
RNGestureHandlerDirectionRight = 1,
|
||||
RNGestureHandlerDirectionLeft = 2,
|
||||
RNGestureHandlerDirectionUp = 4,
|
||||
RNGestureHandlerDirectionDown = 8,
|
||||
};
|
56
node_modules/react-native-gesture-handler/ios/RNGestureHandlerEvents.h
generated
vendored
Normal file
56
node_modules/react-native-gesture-handler/ios/RNGestureHandlerEvents.h
generated
vendored
Normal file
@ -0,0 +1,56 @@
|
||||
#import <React/RCTEventDispatcher.h>
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
#import "RNGestureHandlerState.h"
|
||||
|
||||
@interface RNGestureHandlerEventExtraData : NSObject
|
||||
|
||||
@property (readonly) NSDictionary *data;
|
||||
|
||||
- (instancetype)initWithData:(NSDictionary *)data;
|
||||
|
||||
+ (RNGestureHandlerEventExtraData *)forPosition:(CGPoint)position
|
||||
withAbsolutePosition:(CGPoint)absolutePosition
|
||||
withNumberOfTouches:(NSUInteger)numberOfTouches;
|
||||
+ (RNGestureHandlerEventExtraData *)forPan:(CGPoint)position
|
||||
withAbsolutePosition:(CGPoint)absolutePosition
|
||||
withTranslation:(CGPoint)translation
|
||||
withVelocity:(CGPoint)velocity
|
||||
withNumberOfTouches:(NSUInteger)numberOfTouches;
|
||||
+ (RNGestureHandlerEventExtraData *)forForce:(CGFloat)force
|
||||
forPosition:(CGPoint)position
|
||||
withAbsolutePosition:(CGPoint)absolutePosition
|
||||
withNumberOfTouches:(NSUInteger)numberOfTouches;
|
||||
+ (RNGestureHandlerEventExtraData *)forPinch:(CGFloat)scale
|
||||
withFocalPoint:(CGPoint)focalPoint
|
||||
withVelocity:(CGFloat)velocity
|
||||
withNumberOfTouches:(NSUInteger)numberOfTouches;
|
||||
+ (RNGestureHandlerEventExtraData *)forRotation:(CGFloat)rotation
|
||||
withAnchorPoint:(CGPoint)anchorPoint
|
||||
withVelocity:(CGFloat)velocity
|
||||
withNumberOfTouches:(NSUInteger)numberOfTouches;
|
||||
+ (RNGestureHandlerEventExtraData *)forPointerInside:(BOOL)pointerInside;
|
||||
@end
|
||||
|
||||
@interface RNGestureHandlerEvent : NSObject <RCTEvent>
|
||||
|
||||
- (instancetype)initWithReactTag:(NSNumber *)reactTag
|
||||
handlerTag:(NSNumber *)handlerTag
|
||||
state:(RNGestureHandlerState)state
|
||||
extraData:(RNGestureHandlerEventExtraData*)extraData
|
||||
coalescingKey:(uint16_t)coalescingKey NS_DESIGNATED_INITIALIZER;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@interface RNGestureHandlerStateChange : NSObject <RCTEvent>
|
||||
|
||||
- (instancetype)initWithReactTag:(NSNumber *)reactTag
|
||||
handlerTag:(NSNumber *)handlerTag
|
||||
state:(RNGestureHandlerState)state
|
||||
prevState:(RNGestureHandlerState)prevState
|
||||
extraData:(RNGestureHandlerEventExtraData*)extraData NS_DESIGNATED_INITIALIZER;
|
||||
|
||||
@end
|
221
node_modules/react-native-gesture-handler/ios/RNGestureHandlerEvents.m
generated
vendored
Normal file
221
node_modules/react-native-gesture-handler/ios/RNGestureHandlerEvents.m
generated
vendored
Normal file
@ -0,0 +1,221 @@
|
||||
#import "RNGestureHandlerEvents.h"
|
||||
|
||||
#define SAFE_VELOCITY(velocity) @(isnan(velocity) ? 0 : velocity)
|
||||
|
||||
@implementation RNGestureHandlerEventExtraData
|
||||
|
||||
- (instancetype)initWithData:(NSDictionary *)data;
|
||||
{
|
||||
if ((self = [super init])) {
|
||||
_data = data;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
+ (RNGestureHandlerEventExtraData *)forPosition:(CGPoint)position
|
||||
withAbsolutePosition:(CGPoint)absolutePosition
|
||||
withNumberOfTouches:(NSUInteger)numberOfTouches
|
||||
{
|
||||
return [[RNGestureHandlerEventExtraData alloc]
|
||||
initWithData:@{
|
||||
@"x": @(position.x),
|
||||
@"y": @(position.y),
|
||||
@"absoluteX": @(absolutePosition.x),
|
||||
@"absoluteY": @(absolutePosition.y),
|
||||
@"numberOfPointers": @(numberOfTouches)}];
|
||||
}
|
||||
|
||||
+ (RNGestureHandlerEventExtraData *)forPan:(CGPoint)position
|
||||
withAbsolutePosition:(CGPoint)absolutePosition
|
||||
withTranslation:(CGPoint)translation
|
||||
withVelocity:(CGPoint)velocity
|
||||
withNumberOfTouches:(NSUInteger)numberOfTouches
|
||||
{
|
||||
return [[RNGestureHandlerEventExtraData alloc]
|
||||
initWithData:@{
|
||||
@"x": @(position.x),
|
||||
@"y": @(position.y),
|
||||
@"absoluteX": @(absolutePosition.x),
|
||||
@"absoluteY": @(absolutePosition.y),
|
||||
@"translationX": @(translation.x),
|
||||
@"translationY": @(translation.y),
|
||||
@"velocityX": SAFE_VELOCITY(velocity.x),
|
||||
@"velocityY": SAFE_VELOCITY(velocity.y),
|
||||
@"numberOfPointers": @(numberOfTouches)}];
|
||||
}
|
||||
|
||||
+ (RNGestureHandlerEventExtraData *)forForce:(CGFloat)force
|
||||
forPosition:(CGPoint)position
|
||||
withAbsolutePosition:(CGPoint)absolutePosition
|
||||
withNumberOfTouches:(NSUInteger)numberOfTouches
|
||||
{
|
||||
return [[RNGestureHandlerEventExtraData alloc]
|
||||
initWithData:@{
|
||||
@"x": @(position.x),
|
||||
@"y": @(position.y),
|
||||
@"absoluteX": @(absolutePosition.x),
|
||||
@"absoluteY": @(absolutePosition.y),
|
||||
@"force": @(force),
|
||||
@"numberOfPointers": @(numberOfTouches)}];
|
||||
|
||||
}
|
||||
|
||||
+ (RNGestureHandlerEventExtraData *)forPinch:(CGFloat)scale
|
||||
withFocalPoint:(CGPoint)focalPoint
|
||||
withVelocity:(CGFloat)velocity
|
||||
withNumberOfTouches:(NSUInteger)numberOfTouches
|
||||
{
|
||||
return [[RNGestureHandlerEventExtraData alloc]
|
||||
initWithData:@{
|
||||
@"scale": @(scale),
|
||||
@"focalX": @(focalPoint.x),
|
||||
@"focalY": @(focalPoint.y),
|
||||
@"velocity": SAFE_VELOCITY(velocity),
|
||||
@"numberOfPointers": @(numberOfTouches)}];
|
||||
}
|
||||
|
||||
+ (RNGestureHandlerEventExtraData *)forRotation:(CGFloat)rotation
|
||||
withAnchorPoint:(CGPoint)anchorPoint
|
||||
withVelocity:(CGFloat)velocity
|
||||
withNumberOfTouches:(NSUInteger)numberOfTouches
|
||||
{
|
||||
return [[RNGestureHandlerEventExtraData alloc]
|
||||
initWithData:@{@"rotation": @(rotation),
|
||||
@"anchorX": @(anchorPoint.x),
|
||||
@"anchorY": @(anchorPoint.y),
|
||||
@"velocity": SAFE_VELOCITY(velocity),
|
||||
@"numberOfPointers": @(numberOfTouches)}];
|
||||
}
|
||||
|
||||
+ (RNGestureHandlerEventExtraData *)forPointerInside:(BOOL)pointerInside
|
||||
{
|
||||
return [[RNGestureHandlerEventExtraData alloc]
|
||||
initWithData:@{@"pointerInside": @(pointerInside)}];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@implementation RNGestureHandlerEvent
|
||||
{
|
||||
NSNumber *_handlerTag;
|
||||
RNGestureHandlerState _state;
|
||||
RNGestureHandlerEventExtraData *_extraData;
|
||||
}
|
||||
|
||||
@synthesize viewTag = _viewTag;
|
||||
@synthesize coalescingKey = _coalescingKey;
|
||||
|
||||
- (instancetype)initWithReactTag:(NSNumber *)reactTag
|
||||
handlerTag:(NSNumber *)handlerTag
|
||||
state:(RNGestureHandlerState)state
|
||||
extraData:(RNGestureHandlerEventExtraData *)extraData
|
||||
coalescingKey:(uint16_t)coalescingKey
|
||||
{
|
||||
if ((self = [super init])) {
|
||||
_viewTag = reactTag;
|
||||
_handlerTag = handlerTag;
|
||||
_state = state;
|
||||
_extraData = extraData;
|
||||
_coalescingKey = coalescingKey;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
RCT_NOT_IMPLEMENTED(- (instancetype)init)
|
||||
|
||||
- (NSString *)eventName
|
||||
{
|
||||
return @"onGestureHandlerEvent";
|
||||
}
|
||||
|
||||
- (BOOL)canCoalesce
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (id<RCTEvent>)coalesceWithEvent:(id<RCTEvent>)newEvent;
|
||||
{
|
||||
return newEvent;
|
||||
}
|
||||
|
||||
+ (NSString *)moduleDotMethod
|
||||
{
|
||||
return @"RCTEventEmitter.receiveEvent";
|
||||
}
|
||||
|
||||
- (NSArray *)arguments
|
||||
{
|
||||
NSMutableDictionary *body = [NSMutableDictionary dictionaryWithDictionary:_extraData.data];
|
||||
[body setObject:_viewTag forKey:@"target"];
|
||||
[body setObject:_handlerTag forKey:@"handlerTag"];
|
||||
[body setObject:@(_state) forKey:@"state"];
|
||||
return @[self.viewTag, @"onGestureHandlerEvent", body];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@implementation RNGestureHandlerStateChange
|
||||
{
|
||||
NSNumber *_handlerTag;
|
||||
RNGestureHandlerState _state;
|
||||
RNGestureHandlerState _prevState;
|
||||
RNGestureHandlerEventExtraData *_extraData;
|
||||
}
|
||||
|
||||
@synthesize viewTag = _viewTag;
|
||||
@synthesize coalescingKey = _coalescingKey;
|
||||
|
||||
- (instancetype)initWithReactTag:(NSNumber *)reactTag
|
||||
handlerTag:(NSNumber *)handlerTag
|
||||
state:(RNGestureHandlerState)state
|
||||
prevState:(RNGestureHandlerState)prevState
|
||||
extraData:(RNGestureHandlerEventExtraData *)extraData
|
||||
{
|
||||
static uint16_t coalescingKey = 0;
|
||||
if ((self = [super init])) {
|
||||
_viewTag = reactTag;
|
||||
_handlerTag = handlerTag;
|
||||
_state = state;
|
||||
_prevState = prevState;
|
||||
_extraData = extraData;
|
||||
_coalescingKey = coalescingKey++;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
RCT_NOT_IMPLEMENTED(- (instancetype)init)
|
||||
|
||||
- (NSString *)eventName
|
||||
{
|
||||
return @"onGestureHandlerStateChange";
|
||||
}
|
||||
|
||||
- (BOOL)canCoalesce
|
||||
{
|
||||
// TODO: event coalescing
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (id<RCTEvent>)coalesceWithEvent:(id<RCTEvent>)newEvent;
|
||||
{
|
||||
return newEvent;
|
||||
}
|
||||
|
||||
+ (NSString *)moduleDotMethod
|
||||
{
|
||||
return @"RCTEventEmitter.receiveEvent";
|
||||
}
|
||||
|
||||
- (NSArray *)arguments
|
||||
{
|
||||
NSMutableDictionary *body = [NSMutableDictionary dictionaryWithDictionary:_extraData.data];
|
||||
[body setObject:_viewTag forKey:@"target"];
|
||||
[body setObject:_handlerTag forKey:@"handlerTag"];
|
||||
[body setObject:@(_state) forKey:@"state"];
|
||||
[body setObject:@(_prevState) forKey:@"oldState"];
|
||||
return @[self.viewTag, @"onGestureHandlerStateChange", body];
|
||||
}
|
||||
|
||||
@end
|
29
node_modules/react-native-gesture-handler/ios/RNGestureHandlerManager.h
generated
vendored
Normal file
29
node_modules/react-native-gesture-handler/ios/RNGestureHandlerManager.h
generated
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import <React/RCTBridgeModule.h>
|
||||
|
||||
@class RCTUIManager;
|
||||
@class RCTEventDispatcher;
|
||||
|
||||
@interface RNGestureHandlerManager : NSObject
|
||||
|
||||
- (nonnull instancetype)initWithUIManager:(nonnull RCTUIManager *)uiManager
|
||||
eventDispatcher:(nonnull RCTEventDispatcher *)eventDispatcher;
|
||||
|
||||
- (void)createGestureHandler:(nonnull NSString *)handlerName
|
||||
tag:(nonnull NSNumber *)handlerTag
|
||||
config:(nonnull NSDictionary *)config;
|
||||
|
||||
- (void)attachGestureHandler:(nonnull NSNumber *)handlerTag
|
||||
toViewWithTag:(nonnull NSNumber *)viewTag;
|
||||
|
||||
- (void)updateGestureHandler:(nonnull NSNumber *)handlerTag config:(nonnull NSDictionary *)config;
|
||||
|
||||
- (void)dropGestureHandler:(nonnull NSNumber *)handlerTag;
|
||||
|
||||
- (void)handleSetJSResponder:(nonnull NSNumber *)viewTag
|
||||
blockNativeResponder:(nonnull NSNumber *)blockNativeResponder;
|
||||
|
||||
- (void)handleClearJSResponder;
|
||||
|
||||
@end
|
188
node_modules/react-native-gesture-handler/ios/RNGestureHandlerManager.m
generated
vendored
Normal file
188
node_modules/react-native-gesture-handler/ios/RNGestureHandlerManager.m
generated
vendored
Normal file
@ -0,0 +1,188 @@
|
||||
#import "RNGestureHandlerManager.h"
|
||||
|
||||
#import <React/RCTLog.h>
|
||||
#import <React/RCTViewManager.h>
|
||||
#import <React/RCTComponent.h>
|
||||
#import <React/RCTRootView.h>
|
||||
#import <React/RCTTouchHandler.h>
|
||||
#import <React/RCTRootContentView.h>
|
||||
#import <React/RCTUIManager.h>
|
||||
#import <React/RCTEventDispatcher.h>
|
||||
|
||||
#import "RNGestureHandlerState.h"
|
||||
#import "RNGestureHandler.h"
|
||||
#import "RNGestureHandlerRegistry.h"
|
||||
#import "RNRootViewGestureRecognizer.h"
|
||||
|
||||
#import "Handlers/RNPanHandler.h"
|
||||
#import "Handlers/RNTapHandler.h"
|
||||
#import "Handlers/RNFlingHandler.h"
|
||||
#import "Handlers/RNLongPressHandler.h"
|
||||
#import "Handlers/RNNativeViewHandler.h"
|
||||
#import "Handlers/RNPinchHandler.h"
|
||||
#import "Handlers/RNRotationHandler.h"
|
||||
#import "Handlers/RNForceTouchHandler.h"
|
||||
|
||||
// We use the method below instead of RCTLog because we log out messages after the bridge gets
|
||||
// turned down in some cases. Which normally with RCTLog would cause a crash in DEBUG mode
|
||||
#define RCTLifecycleLog(...) RCTDefaultLogFunction(RCTLogLevelInfo, RCTLogSourceNative, @(__FILE__), @(__LINE__), [NSString stringWithFormat:__VA_ARGS__])
|
||||
|
||||
@interface RNGestureHandlerManager () <RNGestureHandlerEventEmitter, RNRootViewGestureRecognizerDelegate>
|
||||
|
||||
@end
|
||||
|
||||
@implementation RNGestureHandlerManager
|
||||
{
|
||||
RNGestureHandlerRegistry *_registry;
|
||||
RCTUIManager *_uiManager;
|
||||
NSMutableSet<UIView*> *_rootViews;
|
||||
RCTEventDispatcher *_eventDispatcher;
|
||||
}
|
||||
|
||||
- (instancetype)initWithUIManager:(RCTUIManager *)uiManager
|
||||
eventDispatcher:(RCTEventDispatcher *)eventDispatcher
|
||||
{
|
||||
if ((self = [super init])) {
|
||||
_uiManager = uiManager;
|
||||
_eventDispatcher = eventDispatcher;
|
||||
_registry = [RNGestureHandlerRegistry new];
|
||||
_rootViews = [NSMutableSet new];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)createGestureHandler:(NSString *)handlerName
|
||||
tag:(NSNumber *)handlerTag
|
||||
config:(NSDictionary *)config
|
||||
{
|
||||
static NSDictionary *map;
|
||||
static dispatch_once_t mapToken;
|
||||
dispatch_once(&mapToken, ^{
|
||||
map = @{
|
||||
@"PanGestureHandler" : [RNPanGestureHandler class],
|
||||
@"TapGestureHandler" : [RNTapGestureHandler class],
|
||||
@"FlingGestureHandler" : [RNFlingGestureHandler class],
|
||||
@"LongPressGestureHandler": [RNLongPressGestureHandler class],
|
||||
@"NativeViewGestureHandler": [RNNativeViewGestureHandler class],
|
||||
@"PinchGestureHandler": [RNPinchGestureHandler class],
|
||||
@"RotationGestureHandler": [RNRotationGestureHandler class],
|
||||
@"ForceTouchGestureHandler": [RNForceTouchHandler class],
|
||||
};
|
||||
});
|
||||
|
||||
Class nodeClass = map[handlerName];
|
||||
if (!nodeClass) {
|
||||
RCTLogError(@"Gesture handler type %@ is not supported", handlerName);
|
||||
return;
|
||||
}
|
||||
|
||||
RNGestureHandler *gestureHandler = [[nodeClass alloc] initWithTag:handlerTag];
|
||||
[gestureHandler configure:config];
|
||||
[_registry registerGestureHandler:gestureHandler];
|
||||
|
||||
__weak id<RNGestureHandlerEventEmitter> emitter = self;
|
||||
gestureHandler.emitter = emitter;
|
||||
}
|
||||
|
||||
|
||||
- (void)attachGestureHandler:(nonnull NSNumber *)handlerTag
|
||||
toViewWithTag:(nonnull NSNumber *)viewTag
|
||||
{
|
||||
UIView *view = [_uiManager viewForReactTag:viewTag];
|
||||
|
||||
[_registry attachHandlerWithTag:handlerTag toView:view];
|
||||
|
||||
// register root view if not already there
|
||||
[self registerRootViewIfNeeded:view];
|
||||
}
|
||||
|
||||
- (void)updateGestureHandler:(NSNumber *)handlerTag config:(NSDictionary *)config
|
||||
{
|
||||
RNGestureHandler *handler = [_registry handlerWithTag:handlerTag];
|
||||
[handler configure:config];
|
||||
}
|
||||
|
||||
- (void)dropGestureHandler:(NSNumber *)handlerTag
|
||||
{
|
||||
[_registry dropHandlerWithTag:handlerTag];
|
||||
}
|
||||
|
||||
- (void)handleSetJSResponder:(NSNumber *)viewTag blockNativeResponder:(NSNumber *)blockNativeResponder
|
||||
{
|
||||
if ([blockNativeResponder boolValue]) {
|
||||
for (RCTRootView *rootView in _rootViews) {
|
||||
for (UIGestureRecognizer *recognizer in rootView.gestureRecognizers) {
|
||||
if ([recognizer isKindOfClass:[RNRootViewGestureRecognizer class]]) {
|
||||
[(RNRootViewGestureRecognizer *)recognizer blockOtherRecognizers];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (void)handleClearJSResponder
|
||||
{
|
||||
// ignore...
|
||||
}
|
||||
|
||||
#pragma mark Root Views Management
|
||||
|
||||
- (void)registerRootViewIfNeeded:(UIView*)childView
|
||||
{
|
||||
UIView *parent = childView;
|
||||
while (parent != nil && ![parent isKindOfClass:[RCTRootView class]]) parent = parent.superview;
|
||||
|
||||
RCTRootView *rootView = (RCTRootView *)parent;
|
||||
UIView *rootContentView = rootView.contentView;
|
||||
if (rootContentView != nil && ![_rootViews containsObject:rootContentView]) {
|
||||
RCTLifecycleLog(@"[GESTURE HANDLER] Initialize gesture handler for root view %@", rootContentView);
|
||||
[_rootViews addObject:rootContentView];
|
||||
RNRootViewGestureRecognizer *recognizer = [RNRootViewGestureRecognizer new];
|
||||
recognizer.delegate = self;
|
||||
rootContentView.userInteractionEnabled = YES;
|
||||
[rootContentView addGestureRecognizer:recognizer];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer
|
||||
didActivateInRootView:(UIView *)rootContentView
|
||||
{
|
||||
// Cancel touches in RN's root view in order to cancel all in-js recognizers
|
||||
|
||||
// As scroll events are special-cased in RN responder implementation and sending them would
|
||||
// trigger JS responder change, we don't cancel touches if the handler that got activated is
|
||||
// a scroll recognizer. This way root view will keep sending touchMove and touchEnd events
|
||||
// and therefore allow JS responder to properly release the responder at the end of the touch
|
||||
// stream.
|
||||
// NOTE: this is not a proper fix and solving this problem requires upstream fixes to RN. In
|
||||
// particular if we have one PanHandler and ScrollView that can work simultaniously then when
|
||||
// the Pan handler activates it would still tigger cancel events.
|
||||
// Once the upstream fix lands the line below along with this comment can be removed
|
||||
if ([gestureRecognizer.view isKindOfClass:[UIScrollView class]]) return;
|
||||
|
||||
UIView *parent = rootContentView.superview;
|
||||
if ([parent isKindOfClass:[RCTRootView class]]) {
|
||||
[((RCTRootContentView*)rootContentView).touchHandler cancel];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
if ([_rootViews count] > 0) {
|
||||
RCTLifecycleLog(@"[GESTURE HANDLER] Tearing down gesture handler registered for views %@", _rootViews);
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark Events
|
||||
|
||||
- (void)sendTouchEvent:(RNGestureHandlerEvent *)event
|
||||
{
|
||||
[_eventDispatcher sendEvent:event];
|
||||
}
|
||||
|
||||
- (void)sendStateChangeEvent:(RNGestureHandlerStateChange *)event
|
||||
{
|
||||
[_eventDispatcher sendEvent:event];
|
||||
}
|
||||
|
||||
@end
|
8
node_modules/react-native-gesture-handler/ios/RNGestureHandlerModule.h
generated
vendored
Normal file
8
node_modules/react-native-gesture-handler/ios/RNGestureHandlerModule.h
generated
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
#import <React/RCTEventEmitter.h>
|
||||
#import <React/RCTBridgeModule.h>
|
||||
#import <React/RCTUIManager.h>
|
||||
|
||||
@interface RNGestureHandlerModule : RCTEventEmitter <RCTBridgeModule>
|
||||
|
||||
@end
|
||||
|
200
node_modules/react-native-gesture-handler/ios/RNGestureHandlerModule.m
generated
vendored
Normal file
200
node_modules/react-native-gesture-handler/ios/RNGestureHandlerModule.m
generated
vendored
Normal file
@ -0,0 +1,200 @@
|
||||
#import "RNGestureHandlerModule.h"
|
||||
|
||||
#import <React/RCTLog.h>
|
||||
#import <React/RCTViewManager.h>
|
||||
#import <React/RCTComponent.h>
|
||||
#import <React/RCTUIManager.h>
|
||||
#import <React/RCTUIManagerUtils.h>
|
||||
#import <React/RCTUIManagerObserverCoordinator.h>
|
||||
|
||||
#import "RNGestureHandlerState.h"
|
||||
#import "RNGestureHandlerDirection.h"
|
||||
#import "RNGestureHandler.h"
|
||||
#import "RNGestureHandlerManager.h"
|
||||
|
||||
#import "RNGestureHandlerButton.h"
|
||||
|
||||
@interface RNGestureHandlerModule () <RCTUIManagerObserver>
|
||||
|
||||
@end
|
||||
|
||||
@interface RNGestureHandlerButtonManager : RCTViewManager
|
||||
@end
|
||||
|
||||
@implementation RNGestureHandlerButtonManager
|
||||
|
||||
RCT_EXPORT_MODULE(RNGestureHandlerButton)
|
||||
|
||||
RCT_EXPORT_VIEW_PROPERTY(enabled, BOOL)
|
||||
#if !TARGET_OS_TV
|
||||
RCT_CUSTOM_VIEW_PROPERTY(exclusive, BOOL, RNGestureHandlerButton)
|
||||
{
|
||||
[view setExclusiveTouch: json == nil ? YES : [RCTConvert BOOL: json]];
|
||||
}
|
||||
#endif
|
||||
RCT_CUSTOM_VIEW_PROPERTY(hitSlop, UIEdgeInsets, RNGestureHandlerButton)
|
||||
{
|
||||
if (json) {
|
||||
UIEdgeInsets hitSlopInsets = [RCTConvert UIEdgeInsets:json];
|
||||
view.hitTestEdgeInsets = UIEdgeInsetsMake(-hitSlopInsets.top, -hitSlopInsets.left, -hitSlopInsets.bottom, -hitSlopInsets.right);
|
||||
} else {
|
||||
view.hitTestEdgeInsets = defaultView.hitTestEdgeInsets;
|
||||
}
|
||||
}
|
||||
|
||||
- (UIView *)view
|
||||
{
|
||||
return [RNGestureHandlerButton new];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
||||
typedef void (^GestureHandlerOperation)(RNGestureHandlerManager *manager);
|
||||
|
||||
@implementation RNGestureHandlerModule
|
||||
{
|
||||
RNGestureHandlerManager *_manager;
|
||||
|
||||
// Oparations called after views have been updated.
|
||||
NSMutableArray<GestureHandlerOperation> *_operations;
|
||||
}
|
||||
|
||||
RCT_EXPORT_MODULE()
|
||||
|
||||
+ (BOOL)requiresMainQueueSetup
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (void)invalidate
|
||||
{
|
||||
_manager = nil;
|
||||
[self.bridge.uiManager.observerCoordinator removeObserver:self];
|
||||
}
|
||||
|
||||
- (dispatch_queue_t)methodQueue
|
||||
{
|
||||
// This module needs to be on the same queue as the UIManager to avoid
|
||||
// having to lock `_operations` and `_preOperations` since `uiManagerWillFlushUIBlocks`
|
||||
// will be called from that queue.
|
||||
|
||||
// This is required as this module rely on having all the view nodes created before
|
||||
// gesture handlers can be associated with them
|
||||
return RCTGetUIManagerQueue();
|
||||
}
|
||||
|
||||
- (void)setBridge:(RCTBridge *)bridge
|
||||
{
|
||||
[super setBridge:bridge];
|
||||
|
||||
_manager = [[RNGestureHandlerManager alloc]
|
||||
initWithUIManager:bridge.uiManager
|
||||
eventDispatcher:bridge.eventDispatcher];
|
||||
_operations = [NSMutableArray new];
|
||||
[bridge.uiManager.observerCoordinator addObserver:self];
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(createGestureHandler:(nonnull NSString *)handlerName tag:(nonnull NSNumber *)handlerTag config:(NSDictionary *)config)
|
||||
{
|
||||
[self addOperationBlock:^(RNGestureHandlerManager *manager) {
|
||||
[manager createGestureHandler:handlerName tag:handlerTag config:config];
|
||||
}];
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(attachGestureHandler:(nonnull NSNumber *)handlerTag toViewWithTag:(nonnull NSNumber *)viewTag)
|
||||
{
|
||||
[self addOperationBlock:^(RNGestureHandlerManager *manager) {
|
||||
[manager attachGestureHandler:handlerTag toViewWithTag:viewTag];
|
||||
}];
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(updateGestureHandler:(nonnull NSNumber *)handlerTag config:(NSDictionary *)config)
|
||||
{
|
||||
[self addOperationBlock:^(RNGestureHandlerManager *manager) {
|
||||
[manager updateGestureHandler:handlerTag config:config];
|
||||
}];
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(dropGestureHandler:(nonnull NSNumber *)handlerTag)
|
||||
{
|
||||
[self addOperationBlock:^(RNGestureHandlerManager *manager) {
|
||||
[manager dropGestureHandler:handlerTag];
|
||||
}];
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(handleSetJSResponder:(nonnull NSNumber *)viewTag blockNativeResponder:(nonnull NSNumber *)blockNativeResponder)
|
||||
{
|
||||
[self addOperationBlock:^(RNGestureHandlerManager *manager) {
|
||||
[manager handleSetJSResponder:viewTag blockNativeResponder:blockNativeResponder];
|
||||
}];
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(handleClearJSResponder)
|
||||
{
|
||||
[self addOperationBlock:^(RNGestureHandlerManager *manager) {
|
||||
[manager handleClearJSResponder];
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark -- Batch handling
|
||||
|
||||
- (void)addOperationBlock:(GestureHandlerOperation)operation
|
||||
{
|
||||
[_operations addObject:operation];
|
||||
}
|
||||
|
||||
#pragma mark - RCTUIManagerObserver
|
||||
|
||||
- (void)uiManagerWillFlushUIBlocks:(RCTUIManager *)uiManager
|
||||
{
|
||||
[self uiManagerWillPerformMounting:uiManager];
|
||||
}
|
||||
|
||||
- (void)uiManagerWillPerformMounting:(RCTUIManager *)uiManager
|
||||
{
|
||||
if (_operations.count == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
NSArray<GestureHandlerOperation> *operations = _operations;
|
||||
_operations = [NSMutableArray new];
|
||||
|
||||
[uiManager addUIBlock:^(__unused RCTUIManager *manager, __unused NSDictionary<NSNumber *, UIView *> *viewRegistry) {
|
||||
for (GestureHandlerOperation operation in operations) {
|
||||
operation(self->_manager);
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark Events
|
||||
|
||||
- (NSArray<NSString *> *)supportedEvents
|
||||
{
|
||||
return @[@"onGestureHandlerEvent", @"onGestureHandlerStateChange"];
|
||||
}
|
||||
|
||||
#pragma mark Module Constants
|
||||
|
||||
- (NSDictionary *)constantsToExport
|
||||
{
|
||||
return @{ @"State": @{
|
||||
@"UNDETERMINED": @(RNGestureHandlerStateUndetermined),
|
||||
@"BEGAN": @(RNGestureHandlerStateBegan),
|
||||
@"ACTIVE": @(RNGestureHandlerStateActive),
|
||||
@"CANCELLED": @(RNGestureHandlerStateCancelled),
|
||||
@"FAILED": @(RNGestureHandlerStateFailed),
|
||||
@"END": @(RNGestureHandlerStateEnd)
|
||||
},
|
||||
@"Direction": @{
|
||||
@"RIGHT": @(RNGestureHandlerDirectionRight),
|
||||
@"LEFT": @(RNGestureHandlerDirectionLeft),
|
||||
@"UP": @(RNGestureHandlerDirectionUp),
|
||||
@"DOWN": @(RNGestureHandlerDirectionDown)
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
||||
@end
|
18
node_modules/react-native-gesture-handler/ios/RNGestureHandlerRegistry.h
generated
vendored
Normal file
18
node_modules/react-native-gesture-handler/ios/RNGestureHandlerRegistry.h
generated
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
//
|
||||
// RNGestureHandlerRegistry.h
|
||||
// RNGestureHandler
|
||||
//
|
||||
// Created by Krzysztof Magiera on 12/10/2017.
|
||||
// Copyright © 2017 Software Mansion. All rights reserved.
|
||||
//
|
||||
|
||||
#import "RNGestureHandler.h"
|
||||
|
||||
@interface RNGestureHandlerRegistry : NSObject
|
||||
|
||||
- (nullable RNGestureHandler *)handlerWithTag:(nonnull NSNumber *)handlerTag;
|
||||
- (void)registerGestureHandler:(nonnull RNGestureHandler *)gestureHandler;
|
||||
- (void)attachHandlerWithTag:(nonnull NSNumber *)handlerTag toView:(nonnull UIView *)view;
|
||||
- (void)dropHandlerWithTag:(nonnull NSNumber *)handlerTag;
|
||||
|
||||
@end
|
50
node_modules/react-native-gesture-handler/ios/RNGestureHandlerRegistry.m
generated
vendored
Normal file
50
node_modules/react-native-gesture-handler/ios/RNGestureHandlerRegistry.m
generated
vendored
Normal file
@ -0,0 +1,50 @@
|
||||
//
|
||||
// RNGestureHandlerRegistry.m
|
||||
// RNGestureHandler
|
||||
//
|
||||
// Created by Krzysztof Magiera on 12/10/2017.
|
||||
// Copyright © 2017 Software Mansion. All rights reserved.
|
||||
//
|
||||
|
||||
#import "RNGestureHandlerRegistry.h"
|
||||
|
||||
#import <React/RCTAssert.h>
|
||||
|
||||
@implementation RNGestureHandlerRegistry {
|
||||
NSMutableDictionary<NSNumber *, RNGestureHandler *> *_handlers;
|
||||
}
|
||||
|
||||
- (instancetype)init
|
||||
{
|
||||
if ((self = [super init])) {
|
||||
_handlers = [NSMutableDictionary new];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (RNGestureHandler *)handlerWithTag:(NSNumber *)handlerTag
|
||||
{
|
||||
return _handlers[handlerTag];
|
||||
}
|
||||
|
||||
- (void)registerGestureHandler:(RNGestureHandler *)gestureHandler
|
||||
{
|
||||
_handlers[gestureHandler.tag] = gestureHandler;
|
||||
}
|
||||
|
||||
- (void)attachHandlerWithTag:(NSNumber *)handlerTag toView:(UIView *)view
|
||||
{
|
||||
RNGestureHandler *handler = _handlers[handlerTag];
|
||||
RCTAssert(handler != nil, @"Handler for tag %@ does not exists", handlerTag);
|
||||
[handler unbindFromView];
|
||||
[handler bindToView:view];
|
||||
}
|
||||
|
||||
- (void)dropHandlerWithTag:(NSNumber *)handlerTag
|
||||
{
|
||||
RNGestureHandler *handler = _handlers[handlerTag];
|
||||
[handler unbindFromView];
|
||||
[_handlers removeObjectForKey:handlerTag];
|
||||
}
|
||||
|
||||
@end
|
10
node_modules/react-native-gesture-handler/ios/RNGestureHandlerState.h
generated
vendored
Normal file
10
node_modules/react-native-gesture-handler/ios/RNGestureHandlerState.h
generated
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
typedef NS_ENUM(NSInteger, RNGestureHandlerState) {
|
||||
RNGestureHandlerStateUndetermined = 0,
|
||||
RNGestureHandlerStateFailed,
|
||||
RNGestureHandlerStateBegan,
|
||||
RNGestureHandlerStateCancelled,
|
||||
RNGestureHandlerStateActive,
|
||||
RNGestureHandlerStateEnd,
|
||||
};
|
17
node_modules/react-native-gesture-handler/ios/RNRootViewGestureRecognizer.h
generated
vendored
Normal file
17
node_modules/react-native-gesture-handler/ios/RNRootViewGestureRecognizer.h
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
//
|
||||
// RNRootViewGestureRecognizer.h
|
||||
// RNGestureHandler
|
||||
//
|
||||
// Created by Krzysztof Magiera on 12/10/2017.
|
||||
// Copyright © 2017 Software Mansion. All rights reserved.
|
||||
//
|
||||
|
||||
#import "RNGestureHandler.h"
|
||||
|
||||
@interface RNRootViewGestureRecognizer : UIGestureRecognizer
|
||||
|
||||
@property (nullable, nonatomic, weak) id<RNRootViewGestureRecognizerDelegate> delegate;
|
||||
|
||||
- (void)blockOtherRecognizers;
|
||||
|
||||
@end
|
93
node_modules/react-native-gesture-handler/ios/RNRootViewGestureRecognizer.m
generated
vendored
Normal file
93
node_modules/react-native-gesture-handler/ios/RNRootViewGestureRecognizer.m
generated
vendored
Normal file
@ -0,0 +1,93 @@
|
||||
//
|
||||
// RNRootViewGestureRecognizer.m
|
||||
// RNGestureHandler
|
||||
//
|
||||
// Created by Krzysztof Magiera on 12/10/2017.
|
||||
// Copyright © 2017 Software Mansion. All rights reserved.
|
||||
//
|
||||
|
||||
#import "RNRootViewGestureRecognizer.h"
|
||||
|
||||
#import <UIKit/UIGestureRecognizerSubclass.h>
|
||||
|
||||
#import <React/RCTTouchHandler.h>
|
||||
|
||||
@implementation RNRootViewGestureRecognizer
|
||||
{
|
||||
BOOL _active;
|
||||
}
|
||||
|
||||
@dynamic delegate;
|
||||
|
||||
- (instancetype)init
|
||||
{
|
||||
if (self = [super init]) {
|
||||
self.delaysTouchesEnded = NO;
|
||||
self.delaysTouchesBegan = NO;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (BOOL)shouldBeRequiredToFailByGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer
|
||||
{
|
||||
// This method is used to implement "enabled" feature for gesture handlers. We enforce gesture
|
||||
// recognizers that are connected with "disabled" handlers to wait for the root gesture
|
||||
// recognizer to fail and this way we block them from acting.
|
||||
RNGestureHandler *otherHandler = [RNGestureHandler
|
||||
findGestureHandlerByRecognizer:otherGestureRecognizer];
|
||||
if (otherHandler != nil && otherHandler.enabled == NO) {
|
||||
return YES;
|
||||
}
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (BOOL)canPreventGestureRecognizer:(UIGestureRecognizer *)preventedGestureRecognizer
|
||||
{
|
||||
return ![preventedGestureRecognizer isKindOfClass:[RCTTouchHandler class]];
|
||||
}
|
||||
|
||||
- (BOOL)canBePreventedByGestureRecognizer:(UIGestureRecognizer *)preventingGestureRecognizer
|
||||
{
|
||||
// When this method is called it means that one of handlers has activated, in this case we want
|
||||
// to send an info to JS so that it cancells all JS responders
|
||||
[self.delegate gestureRecognizer:preventingGestureRecognizer didActivateInRootView:self.view];
|
||||
return [super canBePreventedByGestureRecognizer:preventingGestureRecognizer];
|
||||
}
|
||||
|
||||
- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
|
||||
{
|
||||
_active = YES;
|
||||
self.state = UIGestureRecognizerStatePossible;
|
||||
}
|
||||
|
||||
- (void)touchesMoved:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
|
||||
{
|
||||
self.state = UIGestureRecognizerStatePossible;
|
||||
}
|
||||
|
||||
- (void)touchesEnded:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
|
||||
{
|
||||
if (self.state == UIGestureRecognizerStateBegan || self.state == UIGestureRecognizerStateChanged) {
|
||||
self.state = UIGestureRecognizerStateEnded;
|
||||
} else {
|
||||
self.state = UIGestureRecognizerStateFailed;
|
||||
}
|
||||
[self reset];
|
||||
_active = NO;
|
||||
}
|
||||
|
||||
- (void)touchesCancelled:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
|
||||
{
|
||||
self.state = UIGestureRecognizerStateCancelled;
|
||||
[self reset];
|
||||
_active = NO;
|
||||
}
|
||||
|
||||
- (void)blockOtherRecognizers
|
||||
{
|
||||
if (_active) {
|
||||
self.state = UIGestureRecognizerStateBegan;
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
Reference in New Issue
Block a user