[self.tableView reloadSections:[NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, 1)] withRowAnimation:UITableViewRowAnimationLeft];
[self.tableView reloadRowsAtIndexPaths:@[ [NSIndexPath indexPathForItem:1 inSection:1]] withRowAnimation:UITableViewRowAnimationRight];
在上面的代碼中,如何在第一行的動畫完成後執行第二行?如何等待UITableView內置動畫完成?
我想這...
[self.tableView beginUpdates];
[self.tableView reloadSections:[NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, 1)] withRowAnimation:UITableViewRowAnimationLeft];
{
[self.tableView beginUpdates];
[self.tableView reloadRowsAtIndexPaths:@[ [NSIndexPath indexPathForItem:1 inSection:1]] withRowAnimation:UITableViewRowAnimationRight];
[self.tableView endUpdates];
}
[self.tableView endUpdates];
這...
[self.tableView beginUpdates];
{
[self.tableView reloadSections:[NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, 1)] withRowAnimation:UITableViewRowAnimationLeft];
}
[self.tableView endUpdates];
[self.tableView beginUpdates];
{
[self.tableView reloadRowsAtIndexPaths:@[ [NSIndexPath indexPathForItem:1 inSection:1]] withRowAnimation:UITableViewRowAnimationRight];
}
...但慢無論哪種方式動畫同時明確發生(真的明顯時動畫開啓)。
你可以從這個http://stackoverflow.com/questions/3832474/uitableview-row-animation-duration-and-completion-callback – Iducool 2013-04-28 11:31:40
它會出現,這是它是如何做需要幫助: HTTP:/ /stackoverflow.com/questions/2802146/callback-for-uitableview-animations – Dev2rights 2013-04-28 12:54:26