[UIView beginAnimations:@"" context:nil];
[UIView setAnimationDuration:1.0];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft forView:[tableView cellForRowAtIndexPath:indexPath] cache:YES];
[UIView commitAnimations];
//设置Cell的动画效果为3D效果
//设置x和y的初始值为0.1;
//cell.layer.transform = CATransform3DMakeScale(0.5, 0.5, 1);//x y z 缩放
//要垂直里外旋转45度,您可以使用下面的代码:
cell.layer.transform=CATransform3DMakeRotation(0.78, 1, 0, 0);// 旋转
//x和y的最终值为1
[UIView animateWithDuration:5 animations:^{
//cell.layer.transform = CATransform3DMakeScale(1, 1, 1);
cell.layer.transform=CATransform3DMakeRotation(0, 0, 0, 0);// 旋转
}];