简体   繁体   English

iOS中的双排导航栏

[英]Double row navigation bar in iOS

I want to have two rows in my navigation bar instead of the usual one. 我希望在导航栏中有两行而不是通常的一行。 The top row will display a navigation bar title, cancel, and a save button. 顶行将显示导航栏标题,取消和保存按钮。 The bottom one (right under it) will display some icons with text. 底部(右下方)将显示一些带文字的图标。 I want to be able to use something like: 我希望能够使用类似的东西:

[[self navigationController] setNavigationBarHidden:YES animated:YES]; [[self navigationController] setNavigationBarHidden:YES animated:YES];

to hide the bottom row when the user taps on the top row or scrolls down. 当用户点击顶行或向下滚动时隐藏底行。

A bunch of apps like LinkedIn use this feature. 像LinkedIn这样的一堆应用程序使用此功能。

Any ideas? 有任何想法吗?

It is a better idea to use a toolbar just under the navigation bar as navigations bars get back buttons etc automatically. 最好使用导航栏下方的工具栏,因为导航栏会自动返回按钮等。 You can hide the toolbar like hiding any other ui component. 您可以隐藏工具栏,就像隐藏任何其他ui组件一样。 Toolbars also get buttons. 工具栏也可以获得按钮。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM