maxkramer / RTFShadedTableView

Clear (app) like category for UITableView providing consecutively shaded cell backgrounds.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RTFShadedTableView

Like Clear, the to-do list manager for iOS, RTFShadedTableView creates consecutively shaded UITableViewCell background colors.

Installation

Install via Cocoapods:

pod 'RTFShadedTableView'

Usage

// Import the category:
#import "UITableView+RTFShadedTableView.h"

...

// Set the to and from background colours
[self.tableView setCellToBackgroundColor:[UIColor greenColor]];
[self.tableView setCellFromBackgroundColor:[UIColor orangeColor]];

// Set the cell's background colours to the shade
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {

    ...

    UIColor *color = [self.tableView ackgroundForCellAtIndexPath:indexPath];
    [cell setBackgroundColor:color];

    ...
}

About

Clear (app) like category for UITableView providing consecutively shaded cell backgrounds.

License:MIT License


Languages

Language:Shell 52.7%Language:Objective-C 37.6%Language:Ruby 6.2%Language:C 3.5%