Instance Method

getObjectValue:forString:errorDescription:

This method is not supported for the NSLengthFormatter class.

Declaration

- (BOOL)getObjectValue:(out id  _Nullable *)obj forString:(NSString *)string errorDescription:(out NSString * _Nullable *)error;

Parameters

obj

An output parameter. If overridden, this parameter should contain the object created from the provided string.

string

A string representation of the object.

error

An output parameter. If overridden, this parameter should contain a description of any errors that occur. If you do not want to receive error messages, set this parameter to NULL.

Return Value

YES if the conversion from string was successful; otherwise, NO.

Discussion

You can override this method in a subclass. For more information, see NSFormatter.

See Also

Formatting Length Strings

forPersonHeightUse

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

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.

- unitStringFromValue:unit:

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

unitStyle

The unit style used by this formatter.