vicpenap/PrettyKit — pull request #12 by echoz (2012-05-06 13:02:34+00:00)
Title: Enhanced UITabBar

This is a huge ass commit. Really sorry for the multiple commits. Should've rebased it first.

That aside, this pull request basically is about an enhanced UITabBar. It has the following features,

1. Shadows that can be configured to appear upwards or downwards
2. Switchable representation of the buttons that appear in the TabBar either between the Apple defaults (UITabBarButton) or the PrettyKit highly configurable version (PrettyTabBarButton)

This new TabBar is should be a drop in replacement while supporting all callbacks that is expected of a UITabBar. Has been tested with UITabBarControllers to work perfectly. No changes needed to make this work with existing projects, just use PrettyTabBar instead of an UITabBar.

The new class PrettyTabBarButton itself provides more configuration than previously possible for normal UITabBars while still support iOS 4.3.

Some of the configurable options include,

- Title font
- Title shadow offset and opacity
- Title color
- Badge border color
- Badge font
- Badge text color
- Badge inner gradient start and end colors
- Image to use for the highlight in the select state or;
- Gradient start and end colors for the highlight in select state
- Badge shadow offset and opacity
- Image to use when the button is selected or;
- Gradient start and end colors for the "tint" on the image to use when button is selected

While these options are configurable on the TabBarButton, they are really only settable via usage of the PrettyTabBar as there is tight coupling between both classes (also how Apple seems to do it).