问题描述
我有一个基于导航的应用程序.第一个视图(rootcontroller)仅以三个大按钮开始.没有导航栏.从那里开始,其他一切都是表格视图并具有导航栏.我这样做是为了显示/隐藏导航栏:
I have a navigation based app. The first view (rootcontroller) starts with three large buttons only. No navigationbar. From there, everything else is tableviews and have navigation bars. I'm doing this to show/hide the navigation bar:
MyAppAppDelegate *appDelegate = [[UIApplication sharedApplication] delegate];
appDelegate.navigationController.navigationBar.hidden = NO;
一旦我离开了根控制器,导航栏会突然就位并位于 tableview 的顶部,而不是向下推.它剪辑了 tableview 的顶部.导航栏消失的方式返回到根控制器并不顺利.是否有更流畅/更好的方法来完成仅隐藏根控制器的导航栏?
Once I leave the root controller, the navigation bar will jerk into place and lay on top of the tableview, rather than pushing it down. It clips the top part of the tableview. Going back to the root controller isn't smooth in how the navigation bar disappears. Is there a smoother/better way to do accomplish hiding the navigation bar for the root controller only?
推荐答案
可以使用[navigationController setNavigationBarHidden:YES animated:YES]来平滑隐藏bar.
You can use [navigationController setNavigationBarHidden:YES animated:YES] to hide the bar smoothly.
参考
这篇关于以流畅的动画显示/隐藏导航栏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!


大气响应式网络建站服务公司织梦模板
高端大气html5设计公司网站源码
织梦dede网页模板下载素材销售下载站平台(带会员中心带筛选)
财税代理公司注册代理记账网站织梦模板(带手机端)
成人高考自考在职研究生教育机构网站源码(带手机端)
高端HTML5响应式企业集团通用类网站织梦模板(自适应手机端)