Skip to content

rbobbins/animation-demo

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 

This app shows demonstrates a folding animation for UITableViewCells.

It can be used on any UIView, but it looks really good on UITableViewCells.

On a UITableViewCell that has one "collapsible" area (thanks autolayout!), the animation looks like this:

Animated demo

Usage:

- (void)foldOpenWithTransparency:(BOOL)withTransparency
             withCompletionBlock:(void (^)(void))completionBlock;

- (void)foldClosedWithTransparency:(BOOL)withTransparency
             withCompletionBlock:(void (^)(void))completionBlock;
  • withTransparency: YES hides all the subviews of the view you're animating, so you can see what's behind it. NO shows a black background while the animation is going on.
  • withCompletionBlock: Sometimes you want to change the state of your superview before animating... use the completion block to change it back when done!