iOS 布局:选项卡的替代方案?

发布于 2025-01-06 08:23:37 字数 361 浏览 1 评论 0原文

我正在开发一个 iPhone 应用程序,它在 UIWebView 中显示移动网络表单。我使用带有导航和选项卡栏的默认 iOS 布局。

iPhone 应用程序的屏幕截图

移动 Web 表单显示在白色区域的 UIWebView 中。由于网络表单有很多输入字段,我们确实需要尽可能多的空间。因此,我们计划移除底部的标签。随着时间的推移,将会有更多的选项卡/部分,因此仅在导航栏左侧为每个部分添加一个按钮并不是一个解决方案。在 iPad 上,可以轻松地使用弹出窗口来处理此问题。

是否有一个标准的 iOS 布局机制可以在不使用选项卡的情况下处理部分/视图的这种更改?

I'm working on a iPhone app which shows an mobile webform in a UIWebView. I'm using a default iOS layout with a navigation and tab bar.

Screenshot of iPhone App

The mobile webform is displayed in a UIWebView in the white area. Since the webform has a lot of input fields, we really need as must space for it as possible. Because of this, we are planing to remove the tabs in the bottom. Over time, there will be more tabs/sections, so it is not a solution to just add a button for each section in the left side of the navigation bar. On a iPad a popover could easily be used to handle this.

Is there a standard iOS layout mechanism to handle this change of sections/views without using tabs?

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

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

发布评论

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

评论(4

给不了的爱 2025-01-13 08:23:37

您可以在 Path 或新的 Facebook 应用程序中做一些长行操作,并将“目录”放在导航栏后面,然后导航栏(连同子视图)滑开以显示它。如果做得正确(即顺利),我认为效果真的很酷。

当您添加越来越多的选项时,这也非常有用,因为表格可以滚动。

这是一个您可能开始使用的框架: http://www.cocoacontrols.com/platforms /ios/controls/iiviewdeckcontroller

You could do something long the lines of Path or the new Facebook app and have the "table of contents" behind the Navbar and the navbar slides away (along with the child view) to reveal it. When done right (ie smoothly) I think the effect is really cool.

This would also work great as you add more and more options, since the table could just scroll.

Here is a framework that might be you started: http://www.cocoacontrols.com/platforms/ios/controls/iiviewdeckcontroller

装纯掩盖桑 2025-01-13 08:23:37

我会考虑将导航栏的标题替换为可让您在选项卡之间切换的控件。您可以将栏的 titleView 属性分配给控件或按钮,它通常会执行正确的操作。

如果您仅限于 2-3 个选项卡,则可以简单地使用 UISegmentedControl。

如果您想要更多,您可以使用一个按钮,点击该按钮会弹出一个视图,让您选择所需的视图。这可能是一个模态表格视图,或者您可以从屏幕底部向上滑动 UIPickerView,类似于键盘。

我在自己的应用程序中使用了这种技术,此处的屏幕截图。点击按钮在视图之间循环(在本例中,我正在更改表格单元格的内容);点击并按住可向上滑动选择器。

I would consider replacing the navigation bar's title with a control that lets you switch between tabs. You can assign the bar's titleView property to a control or a button and it will generally do the right thing.

If you're limited to 2-3 tabs, you could simply use a UISegmentedControl.

If you want more, you could use a button which, when tapped, pops up a view that allows you to select the view you want. This could be a modal table view, or you could slide up a UIPickerView from the bottom of the screen, similar to the keyboard.

I use this technique in an app of my own, screenshots here. Tapping the button cycles between views (in this case, I'm changing the contents of the table cells); tap-and-hold slides up a picker.

诗酒趁年少 2025-01-13 08:23:37

另一种可能性是在滚动视图中将不同的表单排列在页面上,并在底部有一个页面控件,就像天气一样。不过,如果您的列表特别长并且希望保留屏幕空间,最好的选择可能是 FB/Path 样式的侧边栏表格。

Another possibility would be to arrange your different forms on pages in a scroll view with a page control at the bottom, à la Weather. The best option, though, if you’re going to have a particularly long list and want to keep your screen real estate, is probably the FB/Path-style sidebar table.

眼泪都笑了 2025-01-13 08:23:37

我最终使用了 UIActionSheet< /code>但我认为在其他情况下使用像 IIViewDeckController

I ended up using a UIActionSheet but I think it in other situations would be more stylish to use a controller like the IIViewDeckController.

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