From 45c5d6b32a45f8f5782027193789c7d962b32522 Mon Sep 17 00:00:00 2001 From: Benzamin Basher Date: Thu, 9 Mar 2017 11:14:03 +0600 Subject: [PATCH] Showing and hiding the tabBarView manualy in viewWillAppear and viewWillDisappear, because the tabBarView in the MSSTabNavigationBar was never removed or hidden or the rect wasnot made to CGRectZero. Thats why the collectionView inside the MSSTabBarView was showing over the navigation bar in other places, where I dont need tabs. Specially when the NavigationBar is shown or hidden from the code for some pages, this bug definitely happens. --- Source/MSSTabbedPageViewController.m | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Source/MSSTabbedPageViewController.m b/Source/MSSTabbedPageViewController.m index 88afdb6..d7f2cb7 100644 --- a/Source/MSSTabbedPageViewController.m +++ b/Source/MSSTabbedPageViewController.m @@ -46,6 +46,7 @@ - (void)viewWillAppear:(BOOL)animated { tabBarView.dataSource = self; tabBarView.delegate = self; self.tabBarView = tabBarView; + self.tabBarView.hidden = NO; BOOL isInitialController = (self.navigationController.viewControllers.firstObject == self); [navigationBar tabbedPageViewController:self viewWillAppear:animated isInitial:isInitialController]; @@ -64,6 +65,7 @@ - (void)viewWillDisappear:(BOOL)animated { } // remove the current tab bar + self.tabBarView.hidden = YES; self.tabBarView = nil; } }