简体   繁体   English

insertRowsAtIndexPaths自定义动画Swift

[英]insertRowsAtIndexPaths custom animations Swift

My goal is to animate every single inserted cell using the insertRowsAtIndexPaths function. 我的目标是使用insertRowsAtIndexPaths函数为每个插入的单元设置动画。
The only issue is the default animation style isn't exactly what I'm looking for - i need to create a custom one. 唯一的问题是默认动画样式不完全符合我的要求-我需要创建一个自定义样式。

I've browsed stack for solutions and found some, but they are written in objC: Can you do custom animations for UITableView Cell Inserts? 我浏览了堆栈以找到解决方案,但找到了一些解决方案,但是它们都是用objC编写的: 可以为UITableView单元格插入做自定义动画吗?

I'm looking for a similar swift solution. 我正在寻找类似的快速解决方案。

If anyone could share, that would be great. 如果有人可以分享,那将是很棒的。

Thank you. 谢谢。

试用以下代码

table.insertRowsAtIndexPaths(index, withRowAnimation:UITableViewRowAnimation(rawValue: 3))

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM