【问题标题】:How to wait for a UITableView animation to finish?如何等待 UITableView 动画完成?
【发布时间】:2010-08-01 18:23:47
【问题描述】:

我有一个 UITableView,我正在对它进行插入行动画,有时我也有删除行动画。

但问题是有时会在插入完成之前调用删除。

有没有办法知道动画何时结束?

谢谢!

【问题讨论】:

    标签: iphone uitableview iphone-sdk-3.0


    【解决方案1】:

    尝试使用 [tableview beginUpdates] 和 [tableView endUpdates] 方法包装您的插入和删除调用。这将使动画同时发生。

    http://developer.apple.com/library/ios/documentation/uikit/reference/UITableView_Class/Reference/Reference.html#//apple_ref/occ/instm/UITableView/beginUpdates

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-08-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-04-11
      • 1970-01-01
      • 2022-01-04
      相关资源
      最近更新 更多