What is the best way to enter numeric values with decimal points?

前端 未结 11 1814
粉色の甜心
粉色の甜心 2020-11-27 11:25

In my app users need to be able to enter numeric values with decimal places. The iPhone doesn\'t provides a keyboard that\'s specific for this purpose - only a number pad an

11条回答
  •  庸人自扰
    2020-11-27 12:00

    I think it would be good to point out that as of iOS 4.1 you can use the new UIKeyboardTypeDecimalPad.

    So now you just have to:

    myTextField.keyboardType=UIKeyboardTypeDecimalPad;
    

提交回复
热议问题