# NSValueTransformer class documentation

Generated at 2025-12-02 21:52:00 +0000
2006 Free Software Foundation, Inc.
Software documentation for the NSValueTransformer class
Foundation/NSValueTransformer.h
Instances of the NSValueTransformer class are used to convert values from one representation to another. The base class is abstract and its methods must be overridden by subclasses to do the actual work.
allowsReverseTransformation
Returns a flag indicating whether the transformer permits reverse transformations.
setValueTransformer:
transformer
forName:
name
Registers transformer to handle transformations with the specified name.
transformedValueClass
Returns the class of the value produced by this transformer.
valueTransformerForName:
name
Returns the transformer registered for the specified name, or `nil` if no transformer is registered for name. If no transformer is found, but the name corresponds to a valid NSValueTransformer subclass name, the receiver instantiates this subclass using -init and registers it automatically for name.
valueTransformerNames
Returns an array listing the names of all registered value transformers.
reverseTransformedValue:
value
Performs a reverse transformation on the specified value and returns the resulting object.
The default implementation raises an exception if +allowsReverseTransformation returns `NO`, otherwise it calls -transformedValue: and returns the result.
transformedValue:
value
Subclasses should override this method to perform the actual transformation (and reverse transformation if applicable) and return the result.