Skip to content

mduplifting/TableViewCellAnimations

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TableViewCellAnimations

Version License Platform

Usage

To run the example project, clone the repo, and run pod install from the Example directory first.

After installation, you can import the source file through #import <TableViewCellAnimations/ASTableViewCell.h>.

Then, like any other table view, make sure that the kind of table view cell in the table view is ASTableViewCell:

storyboard class setting

Wherever you choose to have the table view's delegate, make sure your implementation of cellForRowAtIndexPath: uses ASTableViewCell:

-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {

    ASTableViewCell *cell = (ASTableViewCell *)[tableView dequeueReusableCellWithIdentifier:@"CellIdentifier"];
    
    [cell setDuration:0.25]; //set the duration of the entrance animation
    [cell addAnimation:kASTableViewCellAnimationFadeIn];
}

Make sure to actually call animate in your willDisplayCell:

-(void)tableView:(UITableView *)tableView willDisplayCell:(nonnull UITableViewCell *)cell forRowAtIndexPath:(nonnull NSIndexPath *)indexPath {
    [(ASTableViewCell *)cell animate];
}

Animations

Currently, we support three different kinds of animations:

-Fade In (kASTableViewCellAnimationFadeIn)

fade in animation

-Slide in from left/right/top/bottom (kASTableViewCellAnimationSlideFromLeft)

slide animation

-Flip horizontally/vertically (kASTableViewçellAnimationFlipHorizontally)

flip animation

Requirements

No requirements for this pod. Enjoy!

Installation

TableViewCellAnimations is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "TableViewCellAnimations"

Author

Adam Suskin, adam@adamsuskin.com

License

TableViewCellAnimations is available under the MIT license. See the LICENSE file for more info.

About

Basic animations for table view cells!

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors