CocoaPods trunk is moving to be read-only. Read more on the blog, there are 14 months to go.
| TestsTested | ✗ |
| LangLanguage | Obj-CObjective C |
| License | Custom |
| ReleasedLast Release | Dec 2014 |
Maintained by Unclaimed.
BRFlabbyTable is a set a classes that allow you to add a bouncy and distortion effect on a cell frame while the table is scrolling. The "flabbiness" of the cells is based on the speed of scrolling.
Upon pressing and dragging, the highlighted cell grows around the touch area.
Import the classes into your view controller:
#import "BRFlabbyTableManager.h"
#import "BRFlabbyTableViewCell.h"Initialize the BRFlabbyTableManager in the viewDidLoad method of your view controller or any init method
self.flabbyTableManager = [[BRFlabbyTableManager alloc] initWithTableView:self.tableView];
[self.flabbyTableManager setDelegate:self];Adopt the BRFlabbyTableManagerDelegate protocol and implement the following delegate method:
- (UIColor *)flabbyTableManager:(BRFlabbyTableManager *)tableManager flabbyColorForIndexPath:(NSIndexPath *)indexPath{
return [UIColor randomColor];
}
Register BRFlabbyTableViewCell subclasses for your UITableView and set their color and behavior in the tableView:cellForRowAtIndexPath: method :
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
BRFlabbyTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"BRFlabbyTableViewCellIdentifier" forIndexPath:indexPath];
[cell setFlabby:YES];
[cell setLongPressAnimated:YES];
[cell setFlabbyColor:[UIColor randomColor]];
return cell;
}Enjoy!
BRFlabbyTableViewCell and its subclasses work with the Interface Builder and Autolayout.
Julien Ducret - [email protected]
Follow me on Twitter (@jbrocoo)
Check out my app, Spores! (AppStore)
BRFlabbyTable is under Apache licence, see the LICENCE file for more info.