BRFlabbyTable 1.0.0

BRFlabbyTable 1.0.0

TestsTested
LangLanguage Obj-CObjective C
License Custom
ReleasedLast Release Dec 2014

Maintained by Unclaimed.


Downloads

Total518
Week0
Month0

Installs

Apps71
Test Targets2
powered by Segment

GitHub

Stars832
Watchers35
Forks85
Issues1
Contributors3
Pull Requests1

Code

Files6
LOCLines of Code 290



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.

http://i.imgur.com/Fl90rLm.png http://i.imgur.com/0KhUhMN.png

Usage

  1. Import the classes into your view controller:

      #import "BRFlabbyTableManager.h"
      #import "BRFlabbyTableViewCell.h"
  2. 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];
  3. Adopt the BRFlabbyTableManagerDelegate protocol and implement the following delegate method:

      - (UIColor *)flabbyTableManager:(BRFlabbyTableManager *)tableManager flabbyColorForIndexPath:(NSIndexPath *)indexPath{
    
          return [UIColor randomColor];
      }
    
  4. 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;
      }
  5. Enjoy!

Notes

BRFlabbyTableViewCell and its subclasses work with the Interface Builder and Autolayout.

Developed By

Julien Ducret - [email protected]

Follow me on Twitter (@jbrocoo)

Check out my app, Spores! (AppStore)

Licence

BRFlabbyTable is under Apache licence, see the LICENCE file for more info.