UITextField format in xx-xx-xxx

后端 未结 10 1729
暖寄归人
暖寄归人 2020-11-27 04:13

I am using UITextField and i want that should take character in the format of xx-xx-xxx only numbers.

any help ?

10条回答
  •  余生分开走
    2020-11-27 05:00

    Implement your logic inside textField:shouldChangeCharactersInRange:replacementString: which is a delegate method.

提交回复
热议问题