Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions ios/RCCTabBarController.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@
- (instancetype)initWithProps:(NSDictionary *)props children:(NSArray *)children globalProps:(NSDictionary*)globalProps bridge:(RCTBridge *)bridge;
- (void)performAction:(NSString*)performAction actionParams:(NSDictionary*)actionParams bridge:(RCTBridge *)bridge completion:(void (^)(void))completion;

@property (nonatomic) BOOL tabBarHidden;

@end
1 change: 1 addition & 0 deletions ios/RCCTabBarController.m
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,7 @@ - (void)performAction:(NSString*)performAction actionParams:(NSDictionary*)actio
if ([performAction isEqualToString:@"setTabBarHidden"])
{
BOOL hidden = [actionParams[@"hidden"] boolValue];
self.tabBarHidden = hidden;

CGRect nextFrame = self.tabBar.frame;
nextFrame.origin.y = UIScreen.mainScreen.bounds.size.height - (hidden ? 0 : self.tabBar.frame.size.height);
Expand Down
2 changes: 1 addition & 1 deletion ios/RCCViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@ - (void)setStyleOnInit
- (BOOL)hidesBottomBarWhenPushed
{
if (!self._hidesBottomBarWhenPushed) return NO;
return (self.navigationController.topViewController == self);
return (self.navigationController.topViewController == self) && ![(RCCTabBarController*)self.tabBarController tabBarHidden];
}

- (BOOL)prefersStatusBarHidden
Expand Down