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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.