jayway/CWFoundation — pull request #2 by PeyloW (2012-03-07 10:34:41+00:00)
Title: Updated for ARC (iOS 4.0 comp), and bug fixes/features to CWTranslator.

Updated to build with ARC, and no warnings under LLVM 3.0. Do not use weak references, and is compatible with objc run-time back to iOS 4.0.

Fix for context and target keyPath for XML attributes.

Added support for named NSValueTransformers in translations. As an example you can define a translation as:
.color-rgb >> color : UIColor(rgbColor);
Then use +[NSValueTransformer setValueTransformer:forName:] to register your custom transformer for "rgbColor".

A new category additions to NSValueTransformer adds support for implementing these transformers using a simple block, or using a one-way translation using a NSDictionary (keys are the original strings, and values are the value to transform to). This dictionary translation is extremely useful for example when translating text in XML to enums.