这篇文章主要介绍“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]; }
到此,关于“cell怎么实现旋转动画效果”的学习就结束了,希望能够解决大家的疑惑。理论与实践的搭配能更好的帮助大家学习,快去试试吧!若想继续学习更多相关知识,请继续关注亿速云网站,小编会继续努力为大家带来更多实用的文章!
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。