Run the following commands to get started:
$ git clone --recursive https://github.com/nicolasgomollon/NGDynamicGradientCell.git
$ cd NGDynamicGradientCell
$ rake setup
-
The
NGDynamicGradientCell
repo depends heavily onSSToolkit
, so you need to follow the instructions for Adding SSToolkit to Your Project. -
Add this line to your
Prefix.pch
file (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 theImages
folder to your project. -
Take a look at
MasterViewController.m
for 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-arc
to the popup window.