title: iOS UITableView Hide Header Space
body: <p>In a view controller I have only a UITableView. In IB I have made Header &amp; Footer height as 1, and have also added the following code but yet above the 1st cell their is lots of space of header. I want to get rid of that space. Even the scrollbar starts from the 1st cell and not on top. </p>
  
  <pre><code>-(CGFloat) tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
  CGFloat height = 0.0001;
  return height;
  }
  
  -(CGFloat) tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
  CGFloat height = 0.0001;
  return height;
  }
  
  -(UIView *) tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
  // Create Empty View
  UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0.0, 0.0, self.view.frame.size.width,
                                                          [self tableView:self.visitorlistsTv heightForHeaderInSection:section]) ];
  return view;
  }
  
  -(UIView *) tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section {
  // Create Empty View
  UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0.0, 0.0, self.view.frame.size.width,
                                                          [self tableView:self.visitorlistsTv heightForFooterInSection:section]) ];
  return view;
  
  }
  </code></pre>
  
  <p>With the above code, the footer part is hidden. But can't get the header hidden too.</p>
  
  <p>Looking at other links for solution I have also added TableView in a View, have added constraints to the tableview, but still the header part is still their. </p>
  
  <p>Where am I going wrong ? How to get rid of it ? </p>