。 Google +に見られるのと同じ効果ではありませんが、簡単に適応できます。セルは、各セルに、我々は以前の設定にそれをバックアニメーションよりも我々はオフセット(およびおそらくは回転)を割り当て表示されている直前
-(void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath
{
static CGFloat duration = .5;
static NSUInteger xOffset = 50;
static NSUInteger yOffset = 200;
if(scrollDirection == STAScrollDirectionDown && lastAnimatedIndex < indexPath.row)
{
cell.frame = CGRectMake(cell.frame.origin.x - xOffset, cell.frame.origin.y+yOffset, cell.frame.size.width, cell.frame.size.height);
[UIView animateWithDuration:duration
animations:^{
cell.frame = CGRectMake(cell.frame.origin.x + xOffset, cell.frame.origin.y - yOffset, cell.frame.size.width, cell.frame.size.height);
} completion:^(BOOL finished) {
lastAnimatedIndex = indexPath.row;
}];
}
}
。
もう少し刺激的な例:
-(void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath
{
CATransform3D rotation = CATransform3DMakeRotation((90.0*M_PI)/180, .0, 0.5, 0.5);
cell.contentView.alpha = 0.8;
cell.contentView.layer.transform = rotation;
cell.contentView.layer.anchorPoint = CGPointMake(0, 0.5);
[UIView animateWithDuration:.5
animations:^{
cell.contentView.layer.transform = CATransform3DIdentity;
cell.contentView.alpha = 1;
cell.contentView.layer.shadowOffset = CGSizeMake(0, 0);
} completion:^(BOOL finished) {
}];
}
ちょっとuはそのための答えを得ることになったのですか?私は同じ動作を実装しようとしている、あなたの助けに感謝します。 –
いいえ、ごめんなさい - 私は標準のスクロールビューを使用して終了しました。 – Marc
@JackKapow、私は便利かもしれない以下の答えを掲載しました。私はおそらくしばらくの間、これをテストする機会を持っているので、あなたはこれを試してみて、それが動作するかどうか、私はここで知っていると私は受け入れ答えとしてそれをマークしますしません@JackKapow – Cezar