我想在加载单元UITableView
时添加动画(从顶部到底部)但是不知道这个,请别人帮助我。如何在tableView中添加动画Swift
下面添加了一个简单的表视图委托方法与数组(arrHeader)。
在此先感谢
let arrHeader = ["City1", "City2", "City3"]
func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return arrHeader.count
}
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCellWithIdentifier("cell")
cell?.textLabel?.text = arrSubHeader[indexPath.row]
return cell!
}
你想,当它显示给动画添加到每个单元格?或整个tableView的动画? –
我想添加到整个表 –
为了确保我理解你想要实现什么,动画将适用于它自己的tableview,而不是在每个单元格上,对不对? –