Skip to content

Commit

Permalink
Fixes for tvOS (#412)
Browse files Browse the repository at this point in the history
* Update RNCSafeAreaProvider.m

* Update RNCSafeAreaProviderComponentView.mm
  • Loading branch information
jacobp100 authored Jul 10, 2023
1 parent b683c52 commit 1b23b4f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ios/Fabric/RNCSafeAreaProviderComponentView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ - (instancetype)initWithFrame:(CGRect)frame
static const auto defaultProps = std::make_shared<const RNCSafeAreaProviderProps>();
_props = defaultProps;

#if !TARGET_OS_TV
[NSNotificationCenter.defaultCenter addObserver:self
selector:@selector(invalidateSafeAreaInsets)
name:UIKeyboardDidShowNotification
Expand All @@ -33,6 +34,7 @@ - (instancetype)initWithFrame:(CGRect)frame
selector:@selector(invalidateSafeAreaInsets)
name:UIKeyboardDidHideNotification
object:nil];
#endif
}

return self;
Expand Down
2 changes: 2 additions & 0 deletions ios/RNCSafeAreaProvider.m
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ @implementation RNCSafeAreaProvider {
- (instancetype)init
{
if ((self = [super init])) {
#if !TARGET_OS_TV
[NSNotificationCenter.defaultCenter addObserver:self
selector:@selector(invalidateSafeAreaInsets)
name:UIKeyboardDidShowNotification
Expand All @@ -21,6 +22,7 @@ - (instancetype)init
selector:@selector(invalidateSafeAreaInsets)
name:UIKeyboardDidHideNotification
object:nil];
#endif
}
return self;
}
Expand Down

0 comments on commit 1b23b4f

Please sign in to comment.