title: Custom UITableView Footer doesn't lock in the bottom as the table view is scrolled
body: <p>I have checked all these 
  <a href="https://stackoverflow.com/questions/18047720/uitableview-make-footer-stay-at-bottom-of-screen">UITableView, make footer stay at bottom of screen?</a></p>
  
  <p><a href="https://stackoverflow.com/questions/15687370/tablefooterview-property-doesnt-fix-the-footer-at-the-bottom-of-the-table-view">tableFooterView property doesn&#39;t fix the footer at the bottom of the table view</a></p>
  
  <p><a href="https://stackoverflow.com/questions/11493252/ios-viewforfooterinsection-sticking-to-bottom-of-uitableview">iOS - viewForFooterInSection sticking to bottom of UITableView</a></p>
  
  <p><a href="https://stackoverflow.com/questions/15679031/proper-way-to-implement-a-footer-in-uitableview">Proper way to implement a footer in UITableView</a></p>
  
  <p>similar questions but unfortunately my problem hasn't resolved.</p>
  
  <p>I have to implement a custom header and footer views with buttons inside. I have created separate UIView's subclasses with .nib files. In my view controller, I'm calling these methods to register nibs for header and footer view.</p>
  
  <pre><code>- (UIView*)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
  {
      CustomTableHeaderView *view = [CustomTableHeaderView header];
      view.delegate = self; //setting delegate to receive callbacks as the buttons inside the view are pressed
      return view;
  }
  
  - (UIView*)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section
  {
      CustomTableFooterView *view = [CustomTableFooterView footer];
      view.delegate = self;
      return view;
  }
  </code></pre>
  
  <p>Where as the class method in the custom views registers a .nib file and returns the view. However the implementation is;</p>
  
  <pre><code>+ (CustomTableHeaderView*)header
  {
      return [[[NSBundle mainBundle]loadNibNamed:@"CustomTableHeaderView" owner:nil options:nil]objectAtIndex:0];
  }
  </code></pre>
  
  <p>Similar implementation for footer.</p>
  
  <p>The problem is that the footer view doesn't lock at the bottom when the table view scrolls. i-e, when there are more rows to fit inside the view, the footer view hides and is revealed when all the rows are scrolled down till the end. I want to lock the footer view at the bottom of the view no matter how much rows are there to scroll.
  The header view has been implemented perfectly by this implementation as it is locked at the top while the rows are being scrolled, however the footer view is scrolled with the rows.</p>
  
  <p>I have also tried     self.tableview.tablefooterview property but it didn't help either.</p>