简体   繁体   English

iPhone settings.bundle中的数字文本字段

[英]Numeric text fields in iPhone settings.bundle

I recently checked out this Apple doc: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/UserDefaults/Preferences/Preferences.html 我最近检查了这个Apple文档: https//developer.apple.com/library/archive/documentation/Cocoa/Conceptual/UserDefaults/Preferences/Preferences.html

And I can now add settings.bundle into my app and can use it. 我现在可以将settings.bundle添加到我的应用程序中并可以使用它。 I can edit Root.plist and I know how to use text fields in this but what I want the user to enter is numeric values. 我可以编辑Root.plist,我知道如何在此使用文本字段,但我希望用户输入的是数值。

The default text field allows user to enter any text but I want to take only numeric values from users. 默认文本字段允许用户输入任何文本但我只想从用户那里获取数值。

How to do that? 怎么做?

Simply set keyboard type to number pad. 只需将键盘类型设置为数字键盘即可 Refer the image below 请参考下图 在此输入图像描述

I have found the answer myself after surfing the net while and found the answer here: 我在网上冲浪后找到了答案,并在此找到答案:

http://devrichardagreene.blogspot.com/2009/01/creating-user-configurations-on-iphone.html http://devrichardagreene.blogspot.com/2009/01/creating-user-configurations-on-iphone.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM