title: iPhone tableview pagination
body: <p>First, please believe me when I say I did search for this answer first... a lot.  I found many examples, but none performing similarly to what I need.  Though I could have been searching using the wrong key words, I don't believe so.</p>
  
  <p>Here is my issue:</p>
  
  <p>I have a table view being populated by a query that is returning a huge amount of data.  The data is for  a list of restaurants, a price rating, and id.  But there are so many restaurants in the database that it fills memory and crashes the app most time.  (I am assuming this is what is going on, as the code works just fine if the query is limited, and has always worked on other pages I query things that don't have as much data returned.)</p>
  
  <p>What I would like to do is make pagination for the application's table view for this page.  I don't see how I could use the "Show More" method, or the auto load when scrolled to the bottom, simply because if you scroll down to the end of the list, you will still have the same issue: filling memory.  Is there a way to do web-like pagination where (if they are not on the first page) they have a "Previous" cell at the top and (if not on the last page) a "Next" cell at the bottom?  These would have to clear the cells out in the current view and drop the data so we're not just adding data which would cause the same issue, then do a new query to populate the cells.</p>
  
  <p>Of course, I do not expect someone to sit here and write all that code for me.  The main part I would need is just how to set up the cells for the next and previous cells.  I should be able to figure the rest out after that, but I don't know how to go about clearing the data from the current table view.</p>
  
  <p>Thanks for any help or suggestions.</p>