开发者

In which situations must I put my code inside an -beginUpdates -endUpdates block, and when is it optional?

I try to figure out what -beginUpdates and -endUpdates is actually good for.

Adding and deleting rows should go inside this. But what else? When must I do it? And when is 开发者_开发技巧it a good idea to do it even if I don't have to?


From the docs for UITableView beingUpdates:

Begin a series of method calls that insert, delete, select, or delete rows and sections of the receiver.

and:

Call this method if you want subsequent insertions, deletion, and selection operations ... to be animated simultaneously

To me, that answers your question precisely.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜