【发布时间】:2018-03-29 11:45:42
【问题描述】:
我只想在一个方向[向下]为UITableViewCell制作动画
我的代码:
func tableView(_ tableView: UITableView, willDisplay cell: UITableViewCell, forRowAt indexPath: IndexPath) {
cell.alpha = 0
let transform = CATransform3DTranslate(CATransform3DIdentity, 0, 200 , 0)
cell.layer.transform = transform
UIView.animate(withDuration: 0.5, delay: 0, usingSpringWithDamping: 1, initialSpringVelocity: 1, options: .curveEaseOut, animations: {
cell.alpha = 1
cell.layer.transform = CATransform3DIdentity
})
}
如何在用户向上滚动时停止该动画[不执行动画]?
谢谢!!
【问题讨论】:
标签: ios swift uitableview