我正在尝试使用一些快速动画来清除 UITableView 中的数据,我正在使用以下代码,它在 iOS8 中运行良好。
然而,当我在 iOS7 上运行它时,它只运行完成后的 block ,而不是第一个动画代码(淡出),所以动画看起来很糟糕, tableview 突然消失并以动画返回。
知道这里出了什么问题吗?它在 iOS7 中有什么问题?
UIView.animateWithDuration (0.5, animations: {
self.tableView.transform = CGAffineTransformMakeScale(0.2, 0.2)
self.tableView.alpha = 0
}, completion: { (value: Bool) in
UIView.animateWithDuration (0.5, animations: {
self.tableView.reloadData()
self.tableView.transform = CGAffineTransformMakeScale(1.0, 1.0)
self.tableView.alpha = 1
println ("animation done")
})
})
最佳答案
尝试移除 UIView.animateWithDuration (0.5, animations: { block inside completion block and check
关于ios - Swift 中的 UIView.animateWithDuration - iOS7 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26664238/