2013-10-31 36 views
4

-[UITableView moveRowAtIndexPath:toIndexPath]期间执行的动画完成后,是否有任何方法执行该方法?moveRowAtIndexPath的完成处理程序?

也就是说,我希望表视图可以将单元格移动到其新的indexPath,然后一旦完成动画,就应该执行一个方法。

+0

你应该把moveRowAtIndexPath:toIndexPath块中的电话,然后打电话给你块之后要的方法。这里是一般的块上的苹果文档,我不确定你希望如何在不看到更多内容的情况下实现它:https://developer.apple.com/library/ios/documentation/cocoa/Conceptual/Blocks/文章/ 00_Introduction.html 让我知道如果你有更多的问题 – jacerate

回答

0

我遇到了这一点,答案是下降到CATransaction

[CATransaction begin]; 
[CATransaction setCompletionBlock:^{ 
    // Your completion code here 
]; 

[table moveRow… 

[CATransaction commit];