fix(macOS): failing build due to missing TARGET_OS_OSX

This commit is contained in:
Samuel 2021-11-26 13:48:56 +01:00 committed by GitHub
parent 14cde20b24
commit 3d7b9cac6e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -190,6 +190,7 @@ NSString *const CUSTOM_SELECTOR = @"_CUSTOM_SELECTOR_";
return self;
}
#if !TARGET_OS_OSX
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer {
// Only allow long press gesture
if ([otherGestureRecognizer isKindOfClass:[UILongPressGestureRecognizer class]]) {
@ -225,6 +226,8 @@ NSString *const CUSTOM_SELECTOR = @"_CUSTOM_SELECTOR_";
}
}
#endif // !TARGET_OS_OSX
- (void)dealloc
{
[[NSNotificationCenter defaultCenter] removeObserver:self];
@ -433,7 +436,7 @@ NSString *const CUSTOM_SELECTOR = @"_CUSTOM_SELECTOR_";
[self setKeyboardDisplayRequiresUserAction: _savedKeyboardDisplayRequiresUserAction];
[self visitSource];
}
#if !TARGET_OS_OSX
// Allow this object to recognize gestures
if (self.menuItems != nil) {
UILongPressGestureRecognizer *longPress = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(startLongPress:)];
@ -444,6 +447,7 @@ NSString *const CUSTOM_SELECTOR = @"_CUSTOM_SELECTOR_";
longPress.cancelsTouchesInView = YES;
[self addGestureRecognizer:longPress];
}
#endif // !TARGET_OS_OSX
}
// Update webview property when the component prop changes.