Skip to content

Commit

Permalink
Changing tab bar controller orientation to portrait
Browse files Browse the repository at this point in the history
Summary:
Applying orientation from navigationOptions to the TabBarController

## Changelog
[iOS][Added] - Added conversion helper for UIInterfaceOrientationMask to RCTConvert

Reviewed By: philIip

Differential Revision: D44553533

fbshipit-source-id: e57c68c56f1184346bf02f5a915d7722660902ff
  • Loading branch information
Enrico Bern Hardy Tanuwidjaja authored and facebook-github-bot committed Mar 31, 2023
1 parent 4890d50 commit 2ab750f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/react-native/React/Base/RCTConvert.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ typedef NSURL RCTFileURL;
+ (UIKeyboardAppearance)UIKeyboardAppearance:(id)json;
+ (UIReturnKeyType)UIReturnKeyType:(id)json;
+ (UIUserInterfaceStyle)UIUserInterfaceStyle:(id)json API_AVAILABLE(ios(12));
+ (UIInterfaceOrientationMask)UIInterfaceOrientationMask:(NSString *)orientation;

#if !TARGET_OS_TV
+ (UIDataDetectorTypes)UIDataDetectorTypes:(id)json;
#endif
Expand Down
12 changes: 12 additions & 0 deletions packages/react-native/React/Base/RCTConvert.m
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,18 @@ + (UIKeyboardType)UIKeyboardType:(id)json RCT_DYNAMIC
UIUserInterfaceStyleUnspecified,
integerValue)

RCT_ENUM_CONVERTER(
UIInterfaceOrientationMask,
(@{
@"ALL" : @(UIInterfaceOrientationMaskAll),
@"PORTRAIT" : @(UIInterfaceOrientationMaskPortrait),
@"LANDSCAPE" : @(UIInterfaceOrientationMaskLandscape),
@"LANDSCAPE_LEFT" : @(UIInterfaceOrientationMaskLandscapeLeft),
@"LANDSCAPE_RIGHT" : @(UIInterfaceOrientationMaskLandscapeRight),
}),
NSNotFound,
unsignedIntegerValue)

RCT_ENUM_CONVERTER(
UIViewContentMode,
(@{
Expand Down

0 comments on commit 2ab750f

Please sign in to comment.