uitextfield - Formatting the number entered in textfield in iPhone -


I have a text field where the user enters the number, which is in thousands of boundaries.

I want the text field to be formatted because the user enters the number, for example: 200000 200000.

How do I go about doing this ??

Many thanks,

s

I have a The only question is!

Here's how you do it. You want to use NSNumberFormatter and want to set it to use decimal style:

  NSNumberFormatter * formatter = [[[NSNumberFormatter alloc] init] autorelease]; [Setter Settlement Style: NSNumberFormatterDecimalStyle]; TextField.text = [Format stringfarmNumber: [Former numberframestring: textfield.txt]];  

Replace textField with the name of your UITextField variable.


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -