#OPUIKit - a collection of custom UIKit components
OPUIKit was built to accomodate the many interface patterns we saw repeatedly while designing apps. This collection of components aims to supplement the UIKit framework and to stay true to UIKit's patterns and idioms. We have no interest in creating or maintaining a monolithic framework, especially when considering how fast Apple innovates with iOS.
OPSideBarNavigationController: A subclass of
UINavigationControllergiving a Facebook-esque navigation interface.
OPButton: Subclasses of
UIButtonrespectively giving a block based interface for low level drawing.
OPTabBarController: A tab bar controller written from scratch, supporting most of the features of
UITabBarController, but highly customizable. The tab bar and tab bar items are instances of
OPControl, respectively, hence subject to the awesomeness that is the block based drawing mentioned above.
OPStyle: a unified interface for skinning UI components. More below.
##Other cool stuff
UINavigationBarsubclass that allows block based custom drawing, and the ability to add a drop shadow underneath.
OPNavigationController: A sensible navigation controller subclass to use in your navigation based apps. It's primary purpose is to use a NIB to replace its navigation bar with an instance of
OPNavigationBarso that we do fancy things like custom drawing and adding a drop shadow in the navigation bar.
UIViewsubclass that simply replaces the default backing layer with a
CAGradientLayerso that we can easily create gradient views.
There is a category on
NSObject that adds an instance method
-styling and class method
+styling to every subclass. It returns an instance of
OPStyle (well, technically
OPStyleProxy, but more on that later) that allows you to set global stylings associated with your class. For example,
[[OPNavigationBar styling] setBackgroundColor:[UIColor lightGrayColor]]; [[OPNavigationBar styling] setShadowHeight:4.0f];
Now all new instances of
OPNavigationBar will be styled accordingly. For a list of styles that can be applied, see
##A note about UIColor objects and iOS 4.x
There seems to be a change in the way iOS handles UIColor objects of varying color spaces from 4.x to 5.x. If you need to support 4.x devices we suggest always using the RGB color space, which means you shouldn't use helpers like
[UIColor grayColor], and instead use
[UIColor colorWithRed:0.5f green:0.5f blue:0.5f alpha:1.0f].
We love CocoaPods, so we recommend you use it.
Checkout OPKitDemo for a demo application using OPUIKit, among other things.