
Question:
I have a tab based application,Which contains no tab bar.
For hiding tab bar i am using hidesBottomBarWhenPushed method in storyboard.
but using this my view have strength animation like : <a href="https://drive.google.com/file/d/14H3Lym0bat4kaYP5rSlFqkJp8QF1xdZm/view" rel="nofollow">https://drive.google.com/file/d/14H3Lym0bat4kaYP5rSlFqkJp8QF1xdZm/view</a>
The tab bar is visible for some time and then it goes down.
For the solution i have put the following code :
<blockquote>self.tabBarController.tabBar.hidden = YES;
</blockquote>in Viewwillappear but did not work. also i have tried to hide it programatically before push but no luck
<a href="https://i.stack.imgur.com/G4q0B.png" rel="nofollow"><img alt="enter image description here" class="b-lazy" data-src="https://i.stack.imgur.com/G4q0B.png" data-original="https://i.stack.imgur.com/G4q0B.png" src="https://etrip.eimg.top/images/2019/05/07/timg.gif" /></a>
Here is my screen which is creating issue. I have removed all the code for hiding the tab bar, Now only hidesBottomBarWhenPushed set from storyboard. But still getting same issue.
I have hide the Bottom bar for checking is it related to layouts, but still my whole view goes up to down for the fraction of second.
Finally I have tried :
let chatRoom = ChatDetailViewController.viewController()
chatRoom.hidesBottomBarWhenPushed = true
self.navigationController?.pushViewController(chatRoom, animated: true)
But Same result.
Here is the screenshot of animation which is happening during push:
<a href="https://i.stack.imgur.com/elUQl.png" rel="nofollow"><img alt="enter image description here" class="b-lazy" data-src="https://i.stack.imgur.com/elUQl.png" data-original="https://i.stack.imgur.com/elUQl.png" src="https://etrip.eimg.top/images/2019/05/07/timg.gif" /></a>
Answer1:viewcontroller.hidesBottomBarWhenPushed = true
Use hidesBottomBarWhenPushed
property as true
when push viewcontroller.
viewcontroller is object of UIViewController
which are going to push into navigation stack.