Skip to content

Commit

Permalink
fix(ios16): fix navigation items in tab group layout (#13530)
Browse files Browse the repository at this point in the history
* fix(ios16): fix navigation items in tab group layout

* chore: handle close behavior in view controller containment as well
  • Loading branch information
hansemannn committed Aug 9, 2022
1 parent 5afeee0 commit d02580b
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions iphone/Classes/TiUITabGroup.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#import "TiUITabGroup.h"
#import "TiUITabGroupProxy.h"
#import "TiUITabProxy.h"
#import <TitaniumKit/TiApp.h>
#import <TitaniumKit/TiColor.h>
#import <TitaniumKit/TiUtils.h>

Expand Down Expand Up @@ -620,9 +621,12 @@ - (void)open:(id)args
{
TiThreadPerformOnMainThread(
^{
UIView *view = [self tabController].view;
[view setFrame:[self bounds]];
[self addSubview:view];
[self.tabController willMoveToParentViewController:TiApp.controller.topPresentedController];

self.tabController.view.frame = self.bounds;
[self addSubview:self.tabController.view];

[TiApp.controller.topPresentedController addChildViewController:self.tabController];
},
NO);
}
Expand All @@ -631,7 +635,11 @@ - (void)close:(id)args
{
if (controller != nil) {
controller.viewControllers = nil;
[controller willMoveToParentViewController:nil];
[controller.view removeFromSuperview];
[controller removeFromParentViewController];
}

RELEASE_TO_NIL(controller);
}

Expand Down

0 comments on commit d02580b

Please sign in to comment.