UIPickerView 与新的 UITableViewController

发布于 2024-12-09 22:13:39 字数 338 浏览 1 评论 0原文

您认为让用户从包含未知但数量较少 (5-20) 的项目的列表中选择项目的更好方法是什么?

我应该在当前屏幕上使用 UIPickerView,还是应该推送新的 UITableViewController 并使用复选标记来指示所选项目(做出选择时自动弹出控制器)?

IMO 第二种选择更好,因为:

(1)您可以同时看到更多选项。

(2) 选择一个项目可以更快——只需触摸屏幕,很多情况下不需要滚动。

(3) UIPickerViews 倾向于(至少对我来说)滚动超过我想要的,这会导致令人沮丧的来回运动:-)

但我仍然看到更多 UIPickerView 的实现。

What do you think is a better method for letting a user choose an item from a list with an unknown but rather small (5-20) number of items?

Should I use a UIPickerView on the current screen, or should I push a new UITableViewController and use a Checkmark to indicate the selected item (popping the controller back automatically when a selection is made)?

IMO the second alternative is better because:

(1) You get a glance of more options at the same time.

(2) Picking an item can be faster - just touching the screen, no need to scroll in many cases.

(3) UIPickerViews tend (at least for me) to scroll more than I want, which causes a frustrating back-and-forth movement :-)

But still I see many more implementations of UIPickerView.

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

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

发布评论

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

评论(2

战皆罪 2024-12-16 22:13:39

表有一个缺陷:正如您所说,您需要将视图控制器推送到屏幕上。因此,您正在引导用户离开其当前的数据集。因此,除了带有选项的列表之外,用户看不到任何内容。
所以,我想说,如果屏幕上有不止一组数据(例如,在表单中),选择器是一个更好的解决方案。让用户多次从表单导航可能会非常混乱。
如果您有大量选项并且仅呈现一次(或两次),那么 TableViewController 是一个更好的解决方案。

Table has one flaw: as you said, you need to PUSH the view controller onto the screen. So, you are navigating a user away from its current set of data. As a result, user cannot see anything except the list with options.
So, I would say picker is a better solution if you have more than one set of data on the screen (eg. in a form). Making user to navigate from the form more than once could be very confusing.
TableViewController is a better solution if you have a large set of options and if you are presenting it only once (or twice).

昵称有卵用 2024-12-16 22:13:39

这确实取决于数据。如果它真的可以全部容纳在一个屏幕上或者如果您要添加搜索框,我同意该表格可以是一个更好的解决方案。我对不同的数据使用这两种方法。一些非常连续的东西,比如以 5 分钟为增量的持续时间,似乎使用拾取器效果更好,特别是如果它可以使用多个轮子。我也使用表格作为多选,并按照您的建议使用复选标记。

It really depends on the data. If it really can all fit on one screen or if you are adding a search box, I agree that the table can be a better solution. I use both methods for different data. Something that is very sequential, like a time duration with increments of 5 minutes, seems to do better with a picker, especially if it could use multiple wheels. I use tables as multi-selects as well, with check-marks as you suggest.

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