Grouper/FlatUIKit — pull request #75 by danielamitay (2013-07-25 19:09:22+00:00)
Title: Declare UIAppearance support for properties

Hey Jack/Alex/co,

This pull request is related to #33 - "UIAppearance compliance would be great"

**1. Mark properties that already work with UIAppearance:**
Most properties already support `UIAppearance` out of the box, so this commit merely marks the `FlatUIKit` properties that work as-is with a `UI_APPEARANCE_SELECTOR` flag. No functionality changes, simply a convention change to indicate to developers that the properties will behave as expected.

**2. Enable UIAppearance support for properties with defaults:**
However, not all properties will work as expected, because some `FlatUIKit` objects are setting default values for some properties during their `-init` phase. The way we support UIAppearance while still enabling property defaults is by setting the defaults on the class' `UIAppearance` in the class' `+initialize` phase. This commit moves default settings into the `+initialize` and marks the properties with a `UI_APPEARANCE_SELECTOR` just like the previous commit.

**Overall:**
Together, these two commits ensure and indicate `UIAppearance` compliance for `CGFloat` and `UIColor` properties of `FUIAlertView`, `FUIButton`, `FUICellBackgroundView`, `FUISegmentedControl` and `FUISwitch`. All components and examples function exactly the same as before.

**Postscript:**
I did not tackle method compliance for `UIAppearance`. If these commits are well-received, I can work my way through the `FlatUIKit` categories. However, method compliance might require some internal re-structuring (unlike these commits).

*Example:*
``` objective-c
// From UIBarButtonItem+FlatUI.m, line 14
- (void) configureFlatButtonWithColor:(UIColor *)color
highlightedColor:(UIColor *)highlightedColor
cornerRadius:(CGFloat) cornerRadius UI_APPEARANCE_SELECTOR;
```
The above method does not actually work with `UIAppearance`. Calling the above method on `UIBarButtonItem`'s `UIAppearance` will result in an "unrecognized selector" crash because `UIBarButtonItem` internally passes the method to the real `UIButton` on the hierarchy, which does not recognize the selector.

If full `UIAppearance` compliance is something that sounds good, I can work my way through.