Skip to content

Commit

Permalink
Ignore exclusive touch on tvOS (#503)
Browse files Browse the repository at this point in the history
exclusiveTouch is not supported on tvOs
  • Loading branch information
kasinskas authored and osdnk committed Mar 6, 2019
1 parent 2e5386c commit 3b11b40
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions ios/RNGestureHandlerButton.m
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ - (instancetype)init
self = [super init];
if (self) {
_hitTestEdgeInsets = UIEdgeInsetsZero;
#if !TARGET_OS_TV
[self setExclusiveTouch:YES];
#endif
}
return self;
}
Expand Down
4 changes: 2 additions & 2 deletions ios/RNGestureHandlerModule.m
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ @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) {
Expand Down

0 comments on commit 3b11b40

Please sign in to comment.