How should I handle text formatting in iOS? I'm not talking about Currency or Decimal styles. Since iOS doesn't have setFormat()
, it's kind of complicated.
Two examples of the format I want: 123.456.789-10
and 123.456.789/1000-00
.
My aim is to format a text field as the user types. Like any normal site does when, for example, you type a phone number. It doesn't comes from a model or anything. The user just needs to type the numbers and when necessary I'll insert the ".","/"
or "-"
.