How to add commas for every 3 numbers while user inputting the text field and also display the number with commas on the label? I am using this function but it does not work.
- (void)commaFormatter
{
NSNumberFormatter *numberFormatter = [[NSNumberFormatter alloc] init];
[numberFormatter setGroupingSeparator:@","];
[numberFormatter setGroupingSize:3];
[numberFormatter setDecimalSeparator:@"."];
[numberFormatter setNumberStyle:NSNumberFormatterDecimalStyle];
}