大佬教程收集整理的这篇文章主要介绍了ios – 如果我为tableview单元设置动画,则表格视图滚动不会停止,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
func tableView(tableView: UITableView,willDisplayCell cell: UITableViewCell,forRowATindexPath indexPath: NSIndexPath) { let rotationTransform = CATransform3DScale(CATransform3DIdentity,0.4,0) cell.layer.transform = rotationTransform UIView.animateWithDuration(0.5) { () -> Void in cell.layer.transform = CATransform3DIdentity } }
这是使用animateWithDuration …方法之一的动画的正常行为.如果您想在动画期间进行用户交互,您可以尝试下面我已经显示的内容.
只需要尝试这样:
func tableView(tableView: UITableView,0) cell.layer.transform = rotationTransform UIView.animateWithDuration(0.5,delay: 0.5,options: UIViewAnimationOptions.AllowUserInteraction,animations: { () -> Void in cell.layer.transform = CATransform3DIdentity },completion: nil) }
希望它对你有所帮助.
以上是大佬教程为你收集整理的ios – 如果我为tableview单元设置动画,则表格视图滚动不会停止全部内容,希望文章能够帮你解决ios – 如果我为tableview单元设置动画,则表格视图滚动不会停止所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。