如何简化用户的大数字输入? [目标C]

发布于 2024-10-01 01:07:52 字数 780 浏览 2 评论 0原文

我正在构建一个非常基本的 iPhone 应用程序,用户可以在其中输入或选择非常大的数字现金价值(通常为数千或数百万)。

目前我正在使用一个简单的文本框条目并选择数字键盘。

我将使用足球转会费的例子作为类比。

转账费用可能高达数百万,我真的不希望用户错误地输入零,或者对他们必须输入的零的数量感到沮丧。

此外,由于文本框/数字现金值不以任何货币格式显示,因此很难直观地知道您输入的金额。

在此 线程 中,我有一种在屏幕;您还会注意到数字被格式化为块(即:2.25m、2m、7.25m 等)——它使过程更加简化并且在视觉上更加直观。

但我不确定如何让用户轻松输入大数字,而不必每次都输入愚蠢的长零。

可能的解决方案 1 -- 使用每个单元包含 3 个以上分段的 UIPickerView。 问题——它无法正确处理较小的数字,而且您可能会得到看起来很奇怪的数字,例如 1.15k,尽管它是正确的,但并不是我想要显示的。

可能的解决方案 2 -- 使用 +/- 按钮允许用户简单地将数字增加/减少 250 或 500 倍。这是最简单的答案,但它不像 UIPickerView 那么优雅

如果有另一种方法可以做到这一点,一种简化用户输入大数字的方法,我会很感兴趣。

I've building a very basic iphone app where the user will be able to enter or select a very large numeric cash value (usually in the thousands or millions).

At the moment I am using a simple text box entry with number pad selected.

I am going to use the example of a Football transfer fee as an analogy.

A transfer fee can be in many millions and I really do not want the user to be mis-typing zero's, or getting frustrated with the number of zero's they have to enter.

In addition, as the text box/numeric cash value is not displayed with any currency formatting it makes it very unintuitive to know just how much you are entering.

In this thread I have a way of displaying big numbers on the screen; you'll also notice the numbers are formatted in chunks (ie: 2.25m, 2m, 7.25m, etc) -- it makes the process more streamlined and is more visually intuitive.

But what I am unsure about is how to make it easy for the user to enter big numbers without typing stupidly long zeros every time.

Possible solution 1 -- Use a UIPickerView with 3+ segments for each of the units.
Problem -- it won't handle smaller numbers properly, also you may get weird looking numbers like 1.15k which although correct is not what I want to display.

Possible solution 2 -- Use a +/- button to allow a user to simply increase/decrease the number by a factor of 250 or 500. This is the simplest answer, but its not as elegant as a UIPickerView

If there is another way to do this, a way to simplify the input of big numeric numbers from a user, I'd be interested.

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

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

发布评论

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

评论(1

虚拟世界 2024-10-08 01:07:52

您可以在文本字段的正上方或下方添加格式化输出。当他们输入数字时,更新格式化字段,添加货币符号、逗号和小数。这不是最优雅的方法,但它实现起来很简单,并且对用户来说很直观。

You could add formatted output right above or below the text field. As they enter numbers, update the formatted field adding currency symbols, commas and decimals. Not the most elegant way to do this, but it would be simple to implement, and intuitive to the user.

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