Skip to content

Commit

Permalink
feat: Screen orientation
Browse files Browse the repository at this point in the history
  • Loading branch information
kkafar committed Mar 31, 2022
1 parent 1d42b0f commit 9438df7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion ios/RNSScreenComponentView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -250,14 +250,20 @@ - (void)updateProps:(Props::Shared const &)props oldProps:(Props::Shared const &
}

if (newScreenProps.statusBarStyle != oldScreenProps.statusBarStyle) {
[self setStatusBarStyle:[RCTConvert RNSStatusBarStyle:[self stringToPropValue:newScreenProps.statusBarStyle]]];
[self setStatusBarStyle:[RCTConvert
RNSStatusBarStyle:[self stringToPropValue:newScreenProps.statusBarStyle]]];
}

if (newScreenProps.statusBarAnimation != oldScreenProps.statusBarAnimation) {
[self setStatusBarAnimation:[RCTConvert
UIStatusBarAnimation:[self stringToPropValue:newScreenProps.statusBarAnimation]]];
}

if (newScreenProps.screenOrientation != oldScreenProps.screenOrientation) {
[self setScreenOrientation:[RCTConvert
UIInterfaceOrientationMask:[self stringToPropValue:newScreenProps.screenOrientation]]];
}

if (newScreenProps.statusBarColor) {
[self logPropNotAvailable:@"statusBarColor"];
}
Expand Down

0 comments on commit 9438df7

Please sign in to comment.