我想移动一行到我的UITableView
底部,有很酷的动画效果,就像在this Grocery Shopping List app中一样。
就像我们可以使用重新排序控件来移动行一样:
如何创建这样的动画?
发布于 2012-01-18 22:28:17
在iOS5中,这可以通过以下UITableView
选择器完成:
- (void)moveRowAtIndexPath:(NSIndexPath *)indexPath toIndexPath:(NSIndexPath *)newIndexPath
例如:
[self.tableView moveRowAtIndexPath:indexPath toIndexPath:[NSIndexPath indexPathForRow:[items count] - 1 inSection:1]];
发布于 2011-12-23 19:05:32
这有点类似于我所做的允许从一个滚动视图拖放到另一个滚动视图。
你会想要创建一个复制/虚拟单元(为了视觉效果),然后删除原始单元,然后动画复制,然后插入到底部,最后删除重复/虚拟单元。
https://stackoverflow.com/questions/2313252
复制相似问题