Run the following commands to get started:
$ git clone --recursive https://github.com/nicolasgomollon/NGDynamicGradientCell.git
$ cd NGDynamicGradientCell
$ rake setup
-
The
NGDynamicGradientCellrepo depends heavily onSSToolkit, so you need to follow the instructions for Adding SSToolkit to Your Project. -
Add this line to your
Prefix.pchfile (between#ifdef __OBJC__and#endif:
#define RGBA(r,g,b,a) [UIColor colorWithRed:r/255.0f green:g/255.0f blue:b/255.0f alpha:a]-
Drag
NGDynamicGradientCell.h,NGDynamicGradientCell.m, and theImagesfolder to your project. -
Take a look at
MasterViewController.mfor an example of the things that should be included in your project'sUITableViewController. -
That's all.
NGDynamicGradientCell uses ARC, and does not support Storyboards.
If your app does not use ARC, it is still possible to compile only certain files with ARC by adding a flag to the .m file(s) that require it:
-
Select your main Xcode project from the sidebar in Xcode.
-
Select the Build Phases tab.
-
Under the Compile Sources group, double-click on the file name.
-
Add
-fobjc-arcto the popup window.
