Skip to content

Commit 2f2efb0

Browse files
committed
Format code
1 parent 9a7b7d0 commit 2f2efb0

File tree

1 file changed

+24
-20
lines changed

1 file changed

+24
-20
lines changed

ios/Fabric/RNCSafeAreaProviderComponentView.mm

Lines changed: 24 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -36,29 +36,31 @@ - (instancetype)initWithFrame:(CGRect)frame
3636
return self;
3737
}
3838

39-
- (void)willMoveToSuperview:(UIView*)newSuperView {
40-
[super willMoveToSuperview:newSuperView];
39+
- (void)willMoveToSuperview:(UIView *)newSuperView
40+
{
41+
[super willMoveToSuperview:newSuperView];
4142

42-
if (newSuperView != nil && !_registeredNotifications) {
43-
_registeredNotifications = YES;
44-
[self registerNotifications];
45-
}
43+
if (newSuperView != nil && !_registeredNotifications) {
44+
_registeredNotifications = YES;
45+
[self registerNotifications];
46+
}
4647
}
4748

48-
- (void)registerNotifications {
49+
- (void)registerNotifications
50+
{
4951
#if !TARGET_OS_TV && !TARGET_OS_OSX
50-
[NSNotificationCenter.defaultCenter addObserver:self
51-
selector:@selector(invalidateSafeAreaInsets)
52-
name:UIKeyboardDidShowNotification
53-
object:nil];
54-
[NSNotificationCenter.defaultCenter addObserver:self
55-
selector:@selector(invalidateSafeAreaInsets)
56-
name:UIKeyboardDidHideNotification
57-
object:nil];
58-
[NSNotificationCenter.defaultCenter addObserver:self
59-
selector:@selector(invalidateSafeAreaInsets)
60-
name:UIKeyboardDidChangeFrameNotification
61-
object:nil];
52+
[NSNotificationCenter.defaultCenter addObserver:self
53+
selector:@selector(invalidateSafeAreaInsets)
54+
name:UIKeyboardDidShowNotification
55+
object:nil];
56+
[NSNotificationCenter.defaultCenter addObserver:self
57+
selector:@selector(invalidateSafeAreaInsets)
58+
name:UIKeyboardDidHideNotification
59+
object:nil];
60+
[NSNotificationCenter.defaultCenter addObserver:self
61+
selector:@selector(invalidateSafeAreaInsets)
62+
name:UIKeyboardDidChangeFrameNotification
63+
object:nil];
6264
#endif
6365
}
6466

@@ -69,7 +71,9 @@ - (void)safeAreaInsetsDidChange
6971

7072
- (void)invalidateSafeAreaInsets
7173
{
72-
if (self.superview == nil) { return; }
74+
if (self.superview == nil) {
75+
return;
76+
}
7377
// This gets called before the view size is set by react-native so
7478
// make sure to wait so we don't set wrong insets to JS.
7579
if (CGSizeEqualToSize(self.frame.size, CGSizeZero)) {

0 commit comments

Comments
 (0)