UITabBarController UINavigationController 设计建议

发布于 2024-07-30 07:38:57 字数 392 浏览 5 评论 0原文

这更像是一个哲学问题,所以请告诉我你的想法。

iPhone SDK 文档指定您可以让选项卡栏控制器包含导航控制器,但不能让导航控制器包含选项卡栏控制器。 似乎有时您可能希望在作为导航控制器堆栈一部分的视图中以表格方式组织视图。 这不合理吗?

我接受 Apple 在这些领域的规定作为福音,因为 HIG 确实提供了似乎揭示了阻力最小的路径的最佳实践(我确信也有例外)。 然而,在标签栏的情况下,我不确定其背后的设计原因。 也许这对其他人来说是显而易见的,但我想不出为什么不允许选项卡作为除根级视图控制器之外的任何东西的充分理由。

你们都认为/知道什么? 这会造成什么设计缺陷? 您将如何解决想要在视图中以表格形式呈现视图的问题? 我需要重新思考整个设计吗?

谢谢。

This is more of a philosophical question than anything, so give me your thoughts.

The iPhone SDK documentation specifies that you may have a tab bar controller contain a navigation controller, but you can't have a navigation controller contain a tab bar controller. It seems that there are times when you might want to organize views within a view that is part of a navigation controller stack in a tabular fashion. Is this unreasonable?

I accept what Apple dictates in these areas as gospel as the HIG does provide best practices that seem to reveal the path of least resistance (I'm sure there are exceptions to that). In the tab bar case, however, I'm not sure the design reasoning behind it. Maybe it's obvious to others, but I can't think of a good reason why you wouldn't allow tabs as anything but a root level view controller.

What do you all think/know? What design flaw would this create? How would you solve this problem of wanting a tabular presentation of views within a view? Do I need to re-think the entire design?

Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

柳絮泡泡 2024-08-06 07:38:57

从设计的角度来看,我可以看到它们来自哪里。 标签栏给人一种锚定、恒定的感觉,而导航栏给人一种动态和可变的感觉。 因此,包含动态内容的选项卡是有意义的,而包含选项卡栏的导航堆栈的动态层次结构中的单个位置锚定到屏幕底部感觉不太正确。 Three20 实现确实以一种更有意义的方式处理了这个问题,将选项卡锚定在导航栏下方,这样它们感觉更像是导航堆栈中该位置的一部分。

话虽如此,Tweetie 滚动了它自己的标签栏,如果我没记错的话,没有 UITabbarController 来规避 UI 指南中的这个细节,并且从交互的角度来看它完全有效。

I can see where they are coming from, from a design perspective. Tabbars feel anchored, constant, where navbars feel dynamic and mutable. So a tab containing dynamic content makes sense, whereas a single spot in the dynamic hierarchy of a navigation stack containing a tab bar, anchored to the bottom of the screen doesn't feel as right. The Three20 implementation does handle this in a way that makes more sense, anchoring the tabs underneath the nav bar, so that they feel more like they are part of that spot in the navigation stack.

Having said that, Tweetie rolls it's own tab bar, if I remember correctly, without a UITabbarController to circumvent this detail in the UI guidelines, and it totally works from an interaction perspective.

§对你不离不弃 2024-08-06 07:38:57

简而言之,在导航控制器中允许 UITabBar 会让用户感到困惑。 该应用程序的行为肯定不会像大多数用户所期望的那样。 但是,这只是 UITabBar,而不是一般选项卡的设计概念。 根据我的设计观点,导航控制器内的选项卡应该位于顶部,而不是底部,就像 UITabBar 一样。

有几种不同的方法可以做到这一点。

我通过让表视图中的第一行具有分段选择器来在导航器视图控制器内完成“选项卡”。 (请参阅应用程序商店中的 HangTime 应用程序)。 我认为它工作得很好,但它们并不是真正的“选项卡”。

Facebook 应用程序的编写者 Joe Hewitt 通过创建自己的“选项卡栏”视图和控制器解决了这个问题,尽管它的呈现方式与 UITabBar 完全不同。 该元素可通过 Three20 框架和开源库获得。 一探究竟:
http://github.com/joehewitt/third20/tree/master

The short answer is it would be confusing to the user to allow UITabBars inside a nav controller. The app would certainly not behave as most users would expect. But, that's just UITabBar, not the design concept of tabs in general. Tabs inside a nav controller, should, in my design opinion, go at the top, not the bottom, as does a UITabBar.

There are a few different ways to do this.

I've done "tabs" inside a navigator view controller by having the first row in a table view have a segmented picker. (See the HangTime app on the app store). I think it works pretty well, but they aren't really "tabs".

Joe Hewitt, the guy who wrote the Facebook app, solved this problem by creating his own "tab bar" view and controller, although it's rendered quite differently than a UITabBar. That element is available through the Three20 framework, and open source library. Check it out:
http://github.com/joehewitt/three20/tree/master

春夜浅 2024-08-06 07:38:57

我认为标签栏控制器旨在成为应用程序(如果使用)的主要导航点。 如果导航控制器包含选项卡控制器,则每当您导航到其他地方时,选项卡都会切换,这可能会让习惯在其他应用程序中常规方式使用选项卡的用户感到困惑。 我认为这是一个很酷的想法,但苹果可能不这么认为。

I think the tab bar controller is intended to be the main point of navigation around an app if it's used. If a nav controller contains a tab controller, then the tabs will switch whenever you navigate elsewhere, which may be confusing to users who are used to using them the regular way in other apps. I think its a cool idea however, but apple may not feel the same way.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文