Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法在完成期间执行的动画后执行方法-[UITableView moveRowAtIndexPath:toIndexPath]?
-[UITableView moveRowAtIndexPath:toIndexPath]
即,我希望表格视图以动画方式将单元格移动到其新的 indexPath,然后一旦动画完成,就应该执行一个方法。
我遇到了这个问题,答案是下拉到CATransaction:
CATransaction
[CATransaction begin]; [CATransaction setCompletionBlock:^{ // Your completion code here ]; [table moveRow… [CATransaction commit];