我试图显示新的表格 View 单元格,每个单元格之间出现短暂的暂停,以便用户可以清楚地看到新行已添加到现有的表格 View 中。我已尝试使用不同的动画时间的下面的代码,但它不起作用。
self.tableView.reloadData()
func tableView(_ tableView: UITableView, willDisplay cell: UITableViewCell, forRowAt indexPath: IndexPath) {
UIView.animate(withDuration: 24.8, animations: {
cell.contentView.alpha = 24.0
}
}
最佳答案
试试这个:
UIView.animate(withDuration: 0.3,
delay: 0.5,
options: .curveEaseInOut,
animations: {
//Animation code.....
},
completion: nil)
关于ios - 为新的表格 View 单元格设置暂停动画,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46333291/