akosma/nib2objc — pull request #1 by ttilley (2011-12-08 11:51:01+00:00)
Title: Design/Architecture tweaks

I've modified the design of the processor class hierarchy with the goal of making it as effortless to extend and maintain as possible. The two primary changes here are that processor lookup is done via a registry class and key processing is determined by naming convention rather than an if/else block. Macros have been added to reduce repetitive boilerplate.

A good example of how this makes processor classes clean and easy to maintain:

``` objc
@implementation UIViewControllerProcessor

RegisterOnLoadWithIB

BooleanKey(definesPresentationContext)
BooleanKey(hidesBottomBarWhenPushed)
BooleanKey(wantsFullScreenLayout)
BooleanKey(providesPresentationContextTransitionStyle)
KeyValueMethod(modalPresentationStyle, uiModalPresentationStyleString)
KeyValueMethod(modalTransitionStyle, uiModalTransitionStyleString)

@end
```

I'm lazy, so I've only updated the direct subclasses with the new style. Overwriting processKey:value: works the same as always provided a fallback call to super is made, which all processors other than direct subclasses already do.

Thoughts?