Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/iphone/35.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Iphone 如何使用UIKeyboardTypeNumberPad格式插入十进制数?_Iphone_Uitextfield - Fatal编程技术网

Iphone 如何使用UIKeyboardTypeNumberPad格式插入十进制数?

Iphone 如何使用UIKeyboardTypeNumberPad格式插入十进制数?,iphone,uitextfield,Iphone,Uitextfield,我正在开发一个应用程序,使用酒店名称和价格名称,所以我使用UITextField为它们输入价格,当我插入价格时,我使用UIKeyboardTypeNumberPad,但不幸的是,有返回键,没有完成键和十进制键,因为价格可能像15.22美元,那么解决方案是什么呢?使用数字和标点符号键盘 textField.keyboardType=UIKeyboardTypeNumbersAndPunctuation; 编辑: UIKeyboardTypeDecimalPad类型仅显示它们,但仅在4.1及更高版

我正在开发一个应用程序,使用酒店名称和价格名称,所以我使用UITextField为它们输入价格,当我插入价格时,我使用UIKeyboardTypeNumberPad,但不幸的是,有返回键,没有完成键和十进制键,因为价格可能像15.22美元,那么解决方案是什么呢?

使用数字和标点符号键盘

textField.keyboardType=UIKeyboardTypeNumbersAndPunctuation;
编辑:


UIKeyboardTypeDecimalPad类型仅显示它们,但仅在4.1及更高版本中可用。

使用数字和标点符号键盘

textField.keyboardType=UIKeyboardTypeNumbersAndPunctuation;
编辑:


UIKeyboardTypeDecimalPad类型仅显示它们,但仅在4.1及更高版本中可用。

@KingOfBliss,我想使用NumberPad,我想实现这一点,而不是这一点,先生,那么你应该设计自己的键盘Thanx,我也有同样的想法,我接受你的答案,因为这也是十进制输入的一种方式:-)请看并告诉我一些想法,因为我对iphone编程不熟悉创建一个名为DecimalPointNumberAdviewController的viewcontroller,然后在.h@interface DecimalPointNumberAdviewController:UIViewController中创建一个名为DecimalPointNumberAdviewController的viewcontroller{NumberKeypadDecimalPoint*numberKeyPad;} @end@KingOfBliss,我想使用NumberPad,我想实现它,而不是这一个,先生,那么你应该设计你自己的键盘Thanx,我也有同样的想法,我接受你的答案,因为这也是十进制输入的一种方式:-)请看并给我一些想法,因为我对iphone编程不熟悉创建viewcontroller命名为DecimalPointNumberPadViewController,然后在.h@接口DecimalPointNumberPadViewController:UIViewController{NumberKeypadDecimalPoint*numberKeyPad;}@end