Programmaticlaly动画动行中的UITableView [英] Programmaticlaly moving rows with animation in UITableView

查看:167
本文介绍了Programmaticlaly动画动行中的UITableView的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想移动一行到我的的UITableView 与就像在的这个杂货店购物清单应用

I want to move a row to the bottom of my UITableView with cool animation effect just like in this Grocery Shopping List app.

就像我们可以重新排序像控制移动行:

Just like we can move rows with reordering control like:

如何创建这样的动画呢?

How can I create such animation?

推荐答案

在IOS 5这可以用下面的的UITableView 选择来完成:

In IOS 5 this can be done with the following UITableView selector:

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

例如:

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

这篇关于Programmaticlaly动画动行中的UITableView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆