Using the Store

Before you implement the details of the store, you are going to implement the code in the controller that uses fetchRSSFeedWithCompletion:. ListViewController only needs to initiate the fetch and describe what will happen in the completion block it passes as the argument.

Right now, the ListViewController is responsible for creating the NSURLRequest and the NSURLConnection. It also implements the delegate methods for NSURLConnection that accumulate the response data from the server and execute code when the request either succeeds or fails. This code needs to be moved into the store; it is request logic. You can begin by deleting the body of fetchEntries in ListViewController.m.

-​ ​(​v​o​i​d​)​f​e​t​c​h​E​n​t​r​i​e​s​ {​ ​ ​ ...

Get iOS Programming: The Big Nerd Ranch Guide now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.