Tutorial :Currency Mask


I need to create a currency mask. I did lines of command and it's works fine, but when i set the value in textfield, occurred infinit loop. I monitoring the textfield with Editing Changed behavior, to catch each caracter that the user set, but when i try to change the text value, the infinity loop happens. :(

Somebody have a simple code?


Are you setting the text in the textFieldDidChange? Because if you do, the textFieldDidChange notification is going to fire again and the text is set again and the notification will fire again and so on...

I tried doing this as well. The only solution I could come up with is formatting your text when the user leaves the textField. I did not find a way to reliable format the contents of the textField while the user was editing it.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »