hidesBottomBarWhenPushed weird animation behaviour when push

≡放荡痞女 提交于 2019-12-13 05:27:50

问题


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 : https://drive.google.com/file/d/14H3Lym0bat4kaYP5rSlFqkJp8QF1xdZm/view

The tab bar is visible for some time and then it goes down.

For the solution i have put the following code :

self.tabBarController.tabBar.hidden = YES;

in Viewwillappear but did not work. also i have tried to hide it programatically before push but no luck

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:


回答1:


viewcontroller.hidesBottomBarWhenPushed = true

Use hidesBottomBarWhenPushed property as true when push viewcontroller.

viewcontroller is object of UIViewController which are going to push into navigation stack.



来源:https://stackoverflow.com/questions/51963911/hidesbottombarwhenpushed-weird-animation-behaviour-when-push

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!