Pagination issue in tableview in iOS
<p>I have one tableview.In tableview each page there is 16 data.</p>

<p>For that I am calling one <code>webservice</code></p>

<p>First I am passing Pagin Zero.</p>

<pre><code>      [self callAPI:0];

-(void)callAPI:(int)page1{
   [dictParams setObject:[NSString stringWithFormat:@"%d",pagin]  forKey:@"pagin"];
 }
</code></pre>

<p>When I scrolldown new data is reloading.But when scroll up to tableview last data is not showing. Here is my code:</p>

<p>perPage = 16;</p>

<p>this is my code for paging</p>

<pre><code> - (void)scrollViewDidScroll:(UIScrollView *)scrollView
    {
    if(self.tblArticle.contentOffset.y &gt;= (self.tblArticle.contentSize.height - self.tblArticle.bounds.size.height))
    {
        if(isPageRefreshing==NO){
            isPageRefreshing=YES;
            [self callAPI:perPage];
        }
    }
      else {
      }
    }
</code></pre>

<p>My requirement is first time pagin value is zero.Each time it will be pagin value + 16</p>

<p>when I scrollup I am not getting last data in tableview.</p>

<p>Can you help me to find out solution?</p>