What do the new enum iOS9 / OSX10.11 NSNumberFormatterStyle mean?

iOS and OS X NSNumberFormatterStyleenum get 4 new values ​​with the new iOS 9 and OS X 10.11 SDK! They sound cool and helpful, but Apple and even Google documentation had nothing to say about them!

What do these new values ​​do when they are passed to the formula, and how do they differ from the old values?


On iOS 9.0 or OS X 10.11> Frameworks> Foundation> NSNumberFormatter.h lines 46-57:

typedef NS_ENUM(NSUInteger, NSNumberFormatterStyle) {
    NSNumberFormatterNoStyle = kCFNumberFormatterNoStyle,
    NSNumberFormatterDecimalStyle = kCFNumberFormatterDecimalStyle,
    NSNumberFormatterCurrencyStyle = kCFNumberFormatterCurrencyStyle,
    NSNumberFormatterPercentStyle = kCFNumberFormatterPercentStyle,
    NSNumberFormatterScientificStyle = kCFNumberFormatterScientificStyle,
    NSNumberFormatterSpellOutStyle = kCFNumberFormatterSpellOutStyle,
    NSNumberFormatterOrdinalStyle NS_ENUM_AVAILABLE(10_11, 9_0) = kCFNumberFormatterOrdinalStyle,
    NSNumberFormatterCurrencyISOCodeStyle NS_ENUM_AVAILABLE(10_11, 9_0) = kCFNumberFormatterCurrencyISOCodeStyle,
    NSNumberFormatterCurrencyPluralStyle NS_ENUM_AVAILABLE(10_11, 9_0) = kCFNumberFormatterCurrencyPluralStyle,
    NSNumberFormatterCurrencyAccountingStyle NS_ENUM_AVAILABLE(10_11, 9_0) = kCFNumberFormatterCurrencyAccountingStyle,
};
+4
source share
1 answer

. 227 - (video; )

18:34 - :

enter image description here

NSNumberFormatterStyles Apple iOS 9 OS X 10.11.

" " , " " " ". , " ", , . .

, , . .

  • 1st Foo
  • 2nd Bar
  • ...
  • 42- Foo Bar
+8

Source: https://habr.com/ru/post/1610037/


All Articles