给cell添加动画

//给cell添加动画
-(void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath { //设置Cell的动画效果为3D效果
//设置x和y的初始值为0.1;
cell.layer.transform = CATransform3DMakeScale(0.1, 0.1, 1);
//x和y的最终值为1
[UIView animateWithDuration:1 animations:^{ cell.layer.transform = CATransform3DMakeScale(1, 1, 1); }]; 

猜你喜欢

转载自blog.csdn.net/u012498386/article/details/80431678
今日推荐