Top "Nsnumberformatter" questions

A Cocoa class for formatting and parsing numerical values.

Using NSNumberFormatter to get a decimal value from an international currency string

It seems that the NSNumberFormatter can't parse Euro (and probably other) currency strings into a numerical type. Can someone please …

iphone objective-c cocoa currency nsnumberformatter
NSNumberFormatter PercentStyle decimal places

I'm using Swift let myDouble = 8.5 as Double let percentFormatter = NSNumberFormatter() percentFormatter.numberStyle = NSNumberFormatterStyle.PercentStyle percentFormatter.multiplier = 1.00 let myString = percentFormatter.stringFromNumber(…

swift nsnumberformatter
NSNumberFormatter Currency Without Symbol?

I am using NSNumberFormatter to get a currency value from a string and it works well. I use this code …

iphone objective-c ipad currency nsnumberformatter
Re-Apply currency formatting to a UITextField on a change event

I'm working with a UITextField that holds a localized currency value. I've seen lots of posts on how to work …

iphone uitextfield currency nsnumberformatter
Convert NSNumber to NSString with NSNumberFormatter

I am converting an NSNumber to an NSString assuming in this example that the selected key in "theindex" is 1000000 NSNumber *…

iphone objective-c cocoa-touch nsnumberformatter
iPhone NSNumberFormatter setFormat:

It appears as though NSNumberFormatter's method for setting custom formatters. setFormat: isn't available on the iPhone... SO this... crashes my …

iphone cocoa-touch nsnumberformatter
Preventing decimals with NSNumberFormatter

I have an NSNumberFormatter which I'm trying to use to generate a whole number of GBP (£) from an NSNumber. I …

ios string-formatting nsnumberformatter
NSNumberFormatter numberFromString returns null

Here's my code NSNumberFormatter *currencyStyle = [[NSNumberFormatter alloc] init]; [currencyStyle setFormatterBehavior:NSNumberFormatterBehavior10_4]; [currencyStyle setNumberStyle:NSNumberFormatterCurrencyStyle]; NSNumber *amount = [[NSNumber alloc] init]; NSLog(@"…

iphone objective-c ios nsnumber nsnumberformatter
Why doesn't NSNumberFormatter remove the decimal point and trailing zeros?

I want to convert an unsigned long int to an NSString formatted with commas every 3 digits and neither a decimal …

objective-c nsnumberformatter
How to format and print float numbers on iOS?

I would like to create a formatted output of a floating point number with correct localization on Cocoa-Touch. The output …

cocoa-touch nsnumberformatter