在这个方法中实现
func tableView(_ tableView: UITableView, willDisplay cell: UITableViewCell, forRowAt indexPath: IndexPath) { }
移动
let transform = CATransform3DIdentity
let transformation = CATransform3DTranslate(transform, 0, -40, 0)
cell.layer.transform = transformation
cell.layer.opacity = 0.0 // 透明度渐变
cell.transform = CGAffineTransform(translationX: 0, y: 40)
UIView.animate(withDuration: 0.8) {
cell.layer.transform = CATransform3DIdentity
cell.layer.opacity = 1
}