Graphics Programs Reference
In-Depth Information
new by the time its completion block is called because its channel has already been up-
dated, so it can't indicate to the user which items are new.
RSSChannel
we use is an empty one for reading from the server, and the second is the
cached one for returning to the controller immediately. The third will begin as a carbon-
copy of the one returned to the
ListViewController
- the one that was in the cache.
However, when the request completes, this carbon-copy will be merged with the new
items, while the one the
ListViewController
has will not. The store will then give
the merged channel to the
ListViewController
, and the
ListViewController
will compare it to the channel it already has. The
ListViewController
will then an-
imate the new items into the table view, which will give the user a better idea of what just
happened.
Figure 29.4 RSSChannels used by the store
One approach to create this carbon-copy would be to load the
RSSChannel
from the
filesystem twice. However, this approach is lame: there is a performance penalty for load-