Instance Method

unitStringFromValue:unit:

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

Declaration

- (NSString *)unitStringFromValue:(double)value unit:(NSLengthFormatterUnit)unit;

Parameters

value

The length’s value for the provided unit.

unit

The unit to use in the resulting length string.

Return Value

A localized string representing the given unit. The provided value determines whether the unit is plural or singular.

See Also

Formatting Length Strings

forPersonHeightUse

A Boolean value that indicates whether the resulting string represents a person’s height.

- getObjectValue:forString:errorDescription:

This method is not supported for the NSLengthFormatter class.

numberFormatter

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

- stringFromMeters:

Returns a length string for the provided value.

- stringFromValue:unit:

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

- unitStringFromMeters:usedUnit:

Returns the unit string for the provided value.

unitStyle

The unit style used by this formatter.