创建cell之后,让cell已动画形式出现

来源:互联网 发布:调和的宝札淘宝 编辑:程序博客网 时间:2024/06/06 09:27
//给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); }];