NSFormatter クラス まとめ
Framework | クラス | OS X | iOS | 用途 |
---|---|---|---|---|
Foundation | NSNumberFormatter | 10.0 | 2.0 | 数値 |
Foundation | NSDateFormatter | 10.0 | 2.0 | 日付 |
Foundation | NSByteCountFormatter | 10.8 | 6.0 | Byte,KB,MB,GB 等 |
MapKit | MKDistanceFormatter | 10.9 | 7.0 | メートル、ヤード、キロ 等 |
Foundation | NSMassFormatter | 10.10 | 8.0 | 重さ、体重、キロ、ポンド 等 |
Foundation | NSLengthFormatter | 10.10 | 8.0 | 長さ、身長、メートル、フィート 等 |
Foundation | NSEnergyFormatter | 10.10 | 8.0 | 熱量、カロリー、ジュール |
Foundation | NSDateIntervalFormatter | 10.10 | 8.0 | 月日時分〜月日時分 等 |
Foundation | NSDateComponentsFormatter | 10.10 | 8.0 | 3か月、2日 等 |
Foundation | NSPersonNameComponentsFormatter | 10.11 | 9.0 | 姓、名、ミドルネーム、敬称 等 |
Foundation | NSMeasurementFormatter | 10.12 | 10.0 | NSMeasurementとNSUnitで扱う速度、質量、時間等の様々な単位 |
Foundation | NSISO8601DateFormatter | 10.12 | 10.0 | ISO 8601 フォーマットの日付 |
いずれも NSFormatter
のサブクラスになっている。
MKDistanceFormatter
だけ MapKit.framework に属するので MapKit を import しないと使用できない。