开发者

how can I insert a decimal number using UIKeyboardTypeNumberPad format?

开发者 https://www.devze.com 2023-02-08 23:57 出处:网络
I am developing a app, taking hotel name开发者_开发问答 and price name so I am using UITextField for them, and when I am inserting price, I am using UIKeyboardTypeNumberPad, but unfortunately there is

I am developing a app, taking hotel name开发者_开发问答 and price name so I am using UITextField for them, and when I am inserting price, I am using UIKeyboardTypeNumberPad, but unfortunately there is return key, no done key and no decimal key, because price can be like 15.22$, so what is solution for this?


use numbers & punctuation keyboard

textField.keyboardType=UIKeyboardTypeNumbersAndPunctuation;

EDIT:

The UIKeyboardTypeDecimalPad type only shows them, but is only available in 4.1 and later.

0

精彩评论

暂无评论...
验证码 换一张
取 消