我可以同时使用UITabBar和UIToolBar吗?
过去一天左右我一直在寻找如何做到这一点。我读过评论说你不应该这样做,但是当我查看其他应用程序时,我看到了它。例如,请查看 App Store 应用程序。它使用底部的 TabBar 进行导航。然后,在“精选”和“前 25 名”部分的顶部,有一个看起来像工具栏的东西,允许用户更具体地了解他们希望查看的内容。我想实现类似的东西,但不知道他们是如何做到的。手机应用程序也使用此功能。
我是否误认为顶部栏是工具栏?
任何见解将不胜感激。
I have been searching for how to do this the past day or so. I have read comments that you shouldn't do this but when I look at other apps I see it. For an example look at the App Store app. It uses a TabBar at the bottom for navigation. Then at the top of the Featured and Top 25 section it has what appears to be a ToolBar allowing the user to be more specific about what content they wish to view. I would like to implement something similar, but can't figure out how they have done it. The phone app uses this as well.
Am I mistaken that the top bar is a ToolBar?
Any insights would be greatly appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您所说的是导航栏中的分段控件,工具栏是完全不同的东西。网上有很多关于自定义导航栏内部结构的教程。
事实上,您应该能够将其拖放到 Interface Builder 中视图的导航栏中。从那里您可以自定义它的不同部分。
希望这有帮助。
What you're talking about is a Segmented Control inside a Navigation Bar, a ToolBar is something entirely different. There are plenty of tutorials online for customizing the innards of a Navigation Bar.
In fact you should just be able to drag one into your view's navigation bar within Interface Builder. From there you can customize it's different segments.
Hope this helps.