O'Reilly logo

iOS Programming: The Big Nerd Ranch Guide by Joe Conway, Aaron Hillegass

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Read and Unread Items

Now that you can cache both RSS feeds, let’s add another useful feature: when the user selects an RSSItem, we want the ListViewController to add an indicator to the table that shows that this item has been read (Figure 29.7). Even if the user closes the application, the list of read items should persist. Nerdfeed, then, needs to store the list of read RSSItems on the filesystem.

Figure 29.7  RSSItems marked as read

RSSItems marked as read

The simplest way to add this feature would be to add a hasBeenRead Boolean instance variable to RSSItem. When the user tapped on a row, the corresponding RSSItem would change its value of hasBeenRead to YES. For ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required