clayallsopp/formotion — pull request #29 by sherbondy (2012-08-10 10:28:26+00:00)
Title: Added property shortcut for enablesReturnKeyAutomatically, first responder, and more reasonable default colors/highlighting

Some of this is a messy hack. I'd love your feedback about how to clean it up a bit.
Not sure if you were trying to avoid subclassing UITableViewCell, but I really wanted to get the highlighting behavior right.

:auto_return might not be the best name for the property.
Maybe :auto_enable_return is a better compromise between pithiness and comprehensibility.

If you have suggestions for avoiding triggering setFirstResponder whenever viewDidAppear happens, I'd love to hear them. This becomes problematic when popping subforms. Could handle pop_subform as a special case (store first_responder in a temporary variable, nil it, then retrieve), but that seems a little dirty.

Oh, and I should probably add tests for the first_responder bits.

Future thoughts, re: custom interfaces:
I think we could make something nice using a combination of: UIAppearance.appearanceWhenContainedIn(FormController.class) and an optional lambda that's called in layoutSubviews.