Kaynağa Gözat

Stop override tabBarItem by parent layouts (#4470)

* Stop override tabBarItem by parent layouts

* Fix unit
Yogev Ben David 6 yıl önce
ebeveyn
işleme
c0912e2396
No account linked to committer's email address

+ 0
- 4
lib/ios/RNNNavigationController.m Dosyayı Görüntüle

53
 	[self.options overrideOptions:options];
53
 	[self.options overrideOptions:options];
54
 }
54
 }
55
 
55
 
56
-- (UITabBarItem *)tabBarItem {
57
-	return self.viewControllers.firstObject.tabBarItem;
58
-}
59
-
60
 - (UIInterfaceOrientationMask)supportedInterfaceOrientations {
56
 - (UIInterfaceOrientationMask)supportedInterfaceOrientations {
61
 	return self.getCurrentChild.supportedInterfaceOrientations;
57
 	return self.getCurrentChild.supportedInterfaceOrientations;
62
 }
58
 }

+ 0
- 4
lib/ios/RNNSideMenuChildVC.m Dosyayı Görüntüle

52
 	[self.options overrideOptions:options];
52
 	[self.options overrideOptions:options];
53
 }
53
 }
54
 
54
 
55
-- (UITabBarItem *)tabBarItem {
56
-	return self.child.tabBarItem;
57
-}
58
-
59
 - (void)bindChildViewController:(UIViewController<RNNLayoutProtocol>*)child {
55
 - (void)bindChildViewController:(UIViewController<RNNLayoutProtocol>*)child {
60
 	self.child = child;
56
 	self.child = child;
61
 	[self addChildViewController:self.child];
57
 	[self addChildViewController:self.child];

+ 0
- 4
lib/ios/RNNSideMenuController.m Dosyayı Görüntüle

42
 	}
42
 	}
43
 }
43
 }
44
 
44
 
45
-- (UITabBarItem *)tabBarItem {
46
-	return self.center.tabBarItem;
47
-}
48
-
49
 - (void)onChildWillAppear {
45
 - (void)onChildWillAppear {
50
 	[_presenter applyOptions:self.resolveOptions];
46
 	[_presenter applyOptions:self.resolveOptions];
51
 	[((UIViewController<RNNParentProtocol> *)self.parentViewController) onChildWillAppear];
47
 	[((UIViewController<RNNParentProtocol> *)self.parentViewController) onChildWillAppear];

+ 0
- 4
lib/ios/ReactNativeNavigationTests/RNNNavigationControllerTest.m Dosyayı Görüntüle

112
 	XCTAssertFalse(self.uut.navigationController.navigationBar.clipsToBounds);
112
 	XCTAssertFalse(self.uut.navigationController.navigationBar.clipsToBounds);
113
 }
113
 }
114
 
114
 
115
-- (void)testTabBarItemShouldReturnFirstChildTabBarItem {
116
-	XCTAssertEqual(self.uut.tabBarItem, self.uut.childViewControllers.firstObject.tabBarItem);
117
-}
118
-
119
 - (void)testSupportedOrientationsShouldReturnCurrentChildSupportedOrientations {
115
 - (void)testSupportedOrientationsShouldReturnCurrentChildSupportedOrientations {
120
 	XCTAssertEqual(self.uut.supportedInterfaceOrientations, self.uut.getCurrentChild.supportedInterfaceOrientations);
116
 	XCTAssertEqual(self.uut.supportedInterfaceOrientations, self.uut.getCurrentChild.supportedInterfaceOrientations);
121
 }
117
 }