Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save mitchellporter/636766d6e19cf0e820d7 to your computer and use it in GitHub Desktop.
Save mitchellporter/636766d6e19cf0e820d7 to your computer and use it in GitHub Desktop.
- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath {
// setup initial state (e.g. before animation)
cell.layer.shadowColor = [[UIColor blackColor] CGColor];
cell.layer.shadowOffset = CGSizeMake(10, 10);
cell.alpha = 0;
cell.layer.transform = CATransform3DMakeScale(0.5, 0.5, 0.5);
cell.layer.anchorPoint = CGPointMake(0, 0.5);
// define final state (e.g. after animation) & commit animation
[UIView beginAnimations:@"scaleTableViewCellAnimationID" context:NULL];
[UIView setAnimationDuration:0.7];
cell.layer.shadowOffset = CGSizeMake(0, 0);
cell.alpha = 1;
cell.layer.transform = CATransform3DIdentity;
[UIView commitAnimations];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment