How to input currency format on a text field (from right to left) using Swift?

前端 未结 9 1043
甜味超标
甜味超标 2020-11-22 01:57

I have a number let’s say 0.00.

  • When the user taps 1. We should have 0.01
  • When the user taps 2. We should display 0.
9条回答
  •  北恋
    北恋 (楼主)
    2020-11-22 02:36

    I started with Leo Dabus' answer (which didn't work out of the box for me) and in the process of trying to simplify and make it work ended up with this, which I think is pretty lean & clean if I do say so myself

提交回复
热议问题