cell怎么实现旋转动画效果

发布时间:2021-08-23 15:12 来源:亿速云 阅读:0 作者:chen 栏目: 网络安全

这篇文章主要介绍“cell怎么实现旋转动画效果”,在日常操作中,相信很多人在cell怎么实现旋转动画效果问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方法,希望对大家解答”cell怎么实现旋转动画效果”的疑惑有所帮助!接下来,请跟着小编一起来学习吧!

tableView角度旋转动画.gif

-(void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath {CATransform3D rotation;

rotation = CATransform3DMakeRotation( (90.0*M_PI)/180, 0.0, 0.7, 0.4);

rotation.m44 =  1.0/ -600;//阴影cell.layer.shadowColor = [[UIColor blackColor]CGColor];//阴影偏移cell.layer.shadowOffset = CGSizeMake(10, 10);

cell.alpha = 0;

cell.layer.transform = rotation;//锚点cell.layer.anchorPoint = CGPointMake(0.5, 0.5);

[UIView beginAnimations:@"rotation" context:NULL];

[UIView setAnimationDuration:0.8];

cell.layer.transform = CATransform3DIdentity;

cell.alpha = 1;

cell.layer.shadowOffset = CGSizeMake(0, 0);

[UIView commitAnimations];

}

免责声明:本站发布的内容(图片、视频和文字)以原创、来自互联网转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系QQ:712375056 进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。