views:

368

answers:

2

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?

A: 

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.

klaaspieter
its very strange... because the contact app there is a mask when the user was editing it. but its ok!!thank u very much for information :)
Helena
A: 

Problem of this of WITH of it I am of Also (google transleitor)

PORTUGUES-BRASIL: também estou com esse problema =/ alguem sabe a solução?

Luís