作者:活宝贝aaaaa日记_452 | 来源:互联网 | 2023-05-17 14:16
HiIamusingthefollowingcodeforatextbox嗨我正在使用以下代码的文本框UITextField*txt_field[[UITextFie
Hi I am using the following code for a text box
嗨我正在使用以下代码的文本框
UITextField *txt_field = [[UITextField alloc] initWithFrame:frame];
[txt_field setKeyboardType: UIKeyboardTypeNumberPad];
Now When I click on the text field, a number pad comes up which dont have a decimal point option. I want a text field with just number pad where user can enter the number in decimal point also. I know I can use other pads but I dont want to allow user to have access to any other character keys other than number and a point. Is it possible.
现在,当我单击文本字段时,会出现一个没有小数点选项的数字键盘。我想要一个只有数字键盘的文本字段,用户也可以输入小数点的数字。我知道我可以使用其他垫,但我不想让用户访问除数字和点之外的任何其他字符键。可能吗。
tnx
1 个解决方案