- (void)scrollViewDidScroll:(UIScrollView *)scrollView
{
CGFloat viewHeight = scrollView.height + scrollView.contentInset.top;
NSArray *cells = self.tableView.visibleCells;
for (int i = 0; i < cells.count; i++) {
UITableViewCell *cell = cells[i];
CGFloat y = cell.centerY - scrollView.contentOffset.y;
CGFloat p = y - viewHeight / 2;
CGFloat scale = cos(p / viewHeight * 0.8) * 0.85;
[UIView animateWithDuration:0.15 delay:0 options:UIViewAnimationOptionCurveEaseInOut|UIViewAnimationOptionAllowUserInteraction | UIViewAnimationOptionBeginFromCurrentState animations:^{
cell.transform = CGAffineTransformMakeScale(scale, scale);
} completion:^(BOOL finished) {
}];
}
}