Must I call -reloadRowsAtIndexPaths:withRowAni开发者_如何学Gomation: inside an -beginUptades -endUpdates block?
It depends what you are trying to do.
You should use beginUpdates/endUpdates for "subsequent insertions, deletion, and selection operations (for example, cellForRowAtIndexPath: and indexPathsForVisibleRows) to be animated simultaneously" (from UITableView beginUpdates)
However, if all you need to do is update the value of something in a cell you don't need the -reloadRowsAtIndexPaths call to be inside a beginUpdates/endUpdates. You can actually just grab the cell directly and update the value in a lot of cases.
See UITableView -reloadRowsAtIndexPaths for more specifics
精彩评论