Skip to content

Commit

Permalink
Reimplemented missing bar style in iOS
Browse files Browse the repository at this point in the history
  • Loading branch information
gosha212 committed Jan 30, 2025
1 parent 550a73f commit 81f1eb6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
7 changes: 4 additions & 3 deletions lib/ios/BottomTabsBasePresenter.m
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#import "BottomTabsBasePresenter.h"
#import "RNNBottomTabsController.h"
#import "UIImage+utils.h"
#import "RNNConvert.h"

@implementation BottomTabsBasePresenter

Expand Down Expand Up @@ -29,8 +30,8 @@ - (void)applyOptions:(RNNNavigationOptions *)options {
[self applyBackgroundColor:[withDefault.bottomTabs.backgroundColor withDefault:nil]
translucent:[withDefault.bottomTabs.translucent withDefault:NO]];
[bottomTabs setTabBarHideShadow:[withDefault.bottomTabs.hideShadow withDefault:NO]];
// [bottomTabs setTabBarStyle:[RCTConvert UIBarStyle:[withDefault.bottomTabs.barStyle
// withDefault:@"default"]]];
[bottomTabs setTabBarStyle:[RNNConvert UIBarStyle:[withDefault.bottomTabs.barStyle
withDefault:@"default"]]];
[self applyTabBarBorder:withDefault.bottomTabs];
[self applyTabBarShadow:withDefault.bottomTabs.shadow];
}
Expand Down Expand Up @@ -60,7 +61,7 @@ - (void)mergeOptions:(RNNNavigationOptions *)mergeOptions
}

if (mergeOptions.bottomTabs.barStyle.hasValue) {
// [bottomTabs setTabBarStyle:[RCTConvert UIBarStyle:mergeOptions.bottomTabs.barStyle.get]];
[bottomTabs setTabBarStyle:[RNNConvert UIBarStyle:mergeOptions.bottomTabs.barStyle.get]];
}

if (mergeOptions.bottomTabs.translucent.hasValue) {
Expand Down
3 changes: 3 additions & 0 deletions lib/ios/RNNConvert.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,7 @@

+ (UIModalTransitionStyle)UIModalTransitionStyle:(id)json;

+ (UIBarStyle)UIBarStyle:(id)json;


@end
5 changes: 3 additions & 2 deletions lib/ios/RNNStackPresenter.m
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#import "RNNStackController.h"
#import "TopBarPresenterCreator.h"
#import "UINavigationController+RNNOptions.h"
#import "RNNConvert.h"

@interface RNNStackPresenter () {
RNNReactComponentRegistry *_componentRegistry;
Expand Down Expand Up @@ -67,8 +68,8 @@ - (void)applyOptions:(RNNNavigationOptions *)options {
[_interactivePopGestureDelegate setEnabled:[withDefault.popGesture withDefault:YES]];
stack.interactivePopGestureRecognizer.delegate = _interactivePopGestureDelegate;

//[stack
// setBarStyle:[RCTConvert UIBarStyle:[withDefault.topBar.barStyle withDefault:@"default"]]];
[stack
setBarStyle:[RNNConvert UIBarStyle:[withDefault.topBar.barStyle withDefault:@"default"]]];
[stack setRootBackgroundImage:[withDefault.rootBackgroundImage withDefault:nil]];
[stack setNavigationBarTestId:[withDefault.topBar.testID withDefault:nil]];
[stack setNavigationBarVisible:[withDefault.topBar.visible withDefault:YES]
Expand Down

0 comments on commit 81f1eb6

Please sign in to comment.