iphone - 在 UITableView 中以编程方式移动带动画的行

标签 iphone cocoa-touch uitableview animation core-animation

我想将一行移动到我的 UITableView 的底部,并具有很酷的动画效果,就像 this Grocery Shopping List app 中一样.

就像我们可以使用重新排序控件移动行一样:

reordering uitableview rows programmatically

如何创建这样的动画?

最佳答案

在 IOS 5 中,可以使用以下 UITableView 选择器来完成此操作:

- (void)moveRowAtIndexPath:(NSIndexPath *)indexPath toIndexPath:(NSIndexPath *)newIndexPath

例如:

[self.tableView moveRowAtIndexPath:indexPath toIndexPath:[NSIndexPath indexPathForRow:[items count] - 1 inSection:1]];

关于iphone - 在 UITableView 中以编程方式移动带动画的行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2313252/

相关文章:

iphone - 自定义 UITableViewCell 在 init* 中设置所有内容或使用属性

swift - 如何根据其可见元素调整表格 View 单元格的高度?

iphone - 了解 Objective-C 范围问题

ios - 如何更改 iphone 应用程序中的语言运行时?

IOS 5 如何更改导航栏中后退按钮的颜色?

Objective-C:UIImageWriteToSavedPhotosAlbum() + 异步 = 问题

iphone - 我怎样才能在 iPhone 应用程序中捕获所有异常

iphone - 应用商店应用版本号

ios - Uitableview Cell Animation like Secret App

ios - 如何在 Swift 中关联两个数组