Class

NSEnergyFormatter

A formatter that provides localized descriptions of energy values.

Declaration

@interface NSEnergyFormatter : NSFormatter

Overview

Topics

Formatting Energy Strings

forFoodEnergyUse

A Boolean value that indicates whether the energy value is used to measure food energy.

- getObjectValue:forString:errorDescription:

This method is not supported for the NSEnergyFormatter class.

numberFormatter

The number formatter used to format the numbers in energy strings.

- stringFromJoules:

Returns an energy string for the provided value.

- stringFromValue:unit:

Returns a properly formatted energy string for the given value and unit.

- unitStringFromJoules:usedUnit:

Returns the unit string for the provided value.

- unitStringFromValue:unit:

Returns the unit string based on the provided value and unit.

unitStyle

The unit style used by this formatter.

Constants

NSEnergyFormatterUnit

The units supported by the NSEnergyFormatter class.

Relationships

Inherits From

See Also

Deprecated

NSLengthFormatter

A formatter that provides localized descriptions of linear distances, such as length and height measurements.

NSMassFormatter

A formatter that provides localized descriptions of mass and weight values.