GithubHelp home page GithubHelp logo

dongshenglin / brflabbytable Goto Github PK

View Code? Open in Web Editor NEW

This project forked from brocoo/brflabbytable

0.0 1.0 0.0 42 KB

Bouncy and distorded table view cells, available on Cocoapods

License: Apache License 2.0

Ruby 11.53% Objective-C 88.47%

brflabbytable's Introduction

BRFlabbyTable

BRFlabbyTable is a set of classes that allow you to add a bouncy and distorted 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.

See BRFlabbyTable in action on Vimeo here and here.

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

Usage

BRFlabbyTable is available via Cocoapods, add this line in your podfile :

pod 'BRFlabbyTable', '~> 1.0'
  1. Import the classes into your view controller:
  #import "BRFlabbyTableManager.h"
  #import "BRFlabbyTableViewCell.h"
  1. 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];
  1. Adopt the BRFlabbyTableManagerDelegate protocol and implement the following delegate method:
  - (UIColor *)flabbyTableManager:(BRFlabbyTableManager *)tableManager flabbyColorForIndexPath:(NSIndexPath *)indexPath{
          
      return [UIColor randomColor];
  }
  1. 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;
  }
  1. Enjoy!

Notes

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

The Android version developed by jpardogo is available at FlabbyListView

Developed By

Julien Ducret - [email protected]

Follow me on Twitter @jbrocoo

Check out my app: Spores

Licence

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

brflabbytable's People

Contributors

brocoo avatar shiyak avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.