I have a fairly simple iPhone app that downloads a set of UITableView results into its model class, and a view controller that's set up to observe these changes using KVO.
This system works well (much better than scattering update code everywhere), except that when I get results, I add them to the backing NSMutableArray one-by-one. This fires many KVO notifications, staggering my row animations in a way that looks odd. Is there a way to coalesce certain KVO notifications so the changes can all happen at once and thus provide a single KVO notification with a single index set?
Alternatively, if I try calling -addObjectsFromArray
to add my new results in a batch fashion, the necessary KVO notifications are never sent, so that must not be one of the observed methods, right? Would it be better to take care of this functionality myself by wrapping my changes with will
/didChangeValueForKey
calls and generating the appropriate index set?