Top "Nsnumberformatter" questions

A Cocoa class for formatting and parsing numerical values.

NSNumberFormatter currency symbol

My application is allowing user to select various currencies for spendings tracking. I have a label which displays the amount …

ios nsnumberformatter currency-formatting
How to convert string with number to NSDecimalNumber that has a comma not a decimal point?

I have an interface giving me numbers like this 0000000012345,78 So i figured out how to make a number out of …

iphone objective-c nsnumber nsnumberformatter
Locale.current reporting wrong language on device

I'm trying to format currency values in an iOS app, and I'm using the current Locale settings on the device …

ios swift locale nsnumberformatter
Trying to format a UITextField to behave like a currency calculator for only numeric input in iOS

I have a UITextField in my application that is supposed to receive only numeric input from the user. This numeric …

ios uitextfield currency nsnumberformatter
NSNumberformatter add extra zero

I'm looking for a way to display "1" as "01", so basically everything below 10 should have a leading 0. What would be the …

ios nsnumberformatter
Swift – String with comma-separator to double

I have currently a string like this: "8,0" or "4,25" and I need to convert it to a Double, but how would …

string swift2 double nsnumberformatter
How to get NSNumberFormatter currency style from ISOCurrencyCodes?

If I were to have EUR, or USD (both ISO currency codes), how could I make my NSNumberFormatter to properly …

ios objective-c nsnumberformatter nslocale
Formatting number as percentage

I don't understand how NSNumberFormatterPercentStyle works! Example: NSNumber *number = [NSNumber numberWithFloat:90.5]; NSNumberFormatter *percentageFormatter = [[[NSNumberFormatter alloc] init] autorelease]; [percentageFormatter setNumberStyle:NSNumberFormatterPercentStyle]; …

ios iphone percentage nsnumber nsnumberformatter
How to avoid rounding off in NSNumberFormatter

I am trying to have a number string with maximum 2 decimals precision, while rest decimals just trimmed off instead of …

ios trim nsnumberformatter decimal
Rounding off decimal fraction in ios

NSNumberFormatter *format = [[NSNumberFormatter alloc]init]; [format setNumberStyle:NSNumberFormatterDecimalStyle]; [format setRoundingMode:NSNumberFormatterRoundHalfUp]; [format setMaximumFractionDigits:2]; NSString *temp = [format stringFromNumber:[NSNumber numberWithFloat:23.4451]]; NSLog(@"%@",…

ios nsnumberformatter