title: If no Table View results, display "No Results" on screen
body: <p>I have a <code>tableview</code>, where sometimes there might not be any results to list, so I <strong>would like to put something up that says "no results"</strong> if there are no results (either a label or one table view cell?).</p>
  
  <p>Is there an easiest way to do this?</p>
  
  <p><em>I would try a <code>label</code> behind the <code>tableview</code> then hide one of the two based on the results, but since I'm working with a <code>TableViewController</code> and not a normal <code>ViewController</code> I'm not sure how smart or doable that is.</em></p>
  
  <p>I'm also using <code>Parse</code> and subclassing as a <code>PFQueryTableViewController</code>:</p>
  
  <pre><code>@interface TableViewController : PFQueryTableViewController
  </code></pre>
  
  <p>I can provide any additional details needed, just let me know!</p>
  
  <p><strong><code>TableViewController</code> Scene in Storyboard:</strong></p>
  
  <p><img src="https://i.stack.imgur.com/MN2Oz.png" alt="enter image description here"></p>
  
  <p><strong>EDIT:</strong> Per Midhun MP, here's the code I'm using</p>
  
  <pre><code>- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
  {
      NSInteger numOfSections = 0;
      if ([self.stringArray count] &gt; 0)
      {
          self.tableView.separatorStyle = UITableViewCellSeparatorStyleSingleLine;
          numOfSections                 = 1;
          //yourTableView.backgroundView   = nil;
          self.tableView.backgroundView = nil;
      }
      else
      {
          UILabel *noDataLabel         = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, self.tableView.bounds.size.width, self.tableView.bounds.size.height)];
          noDataLabel.text             = @"No data available";
          noDataLabel.textColor        = [UIColor blackColor];
          noDataLabel.textAlignment    = NSTextAlignmentCenter;
          //yourTableView.backgroundView = noDataLabel;
          //yourTableView.separatorStyle = UITableViewCellSeparatorStyleNone;
          self.tableView.backgroundView = noDataLabel;
          self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
      }
  
      return numOfSections;
  }
  </code></pre>
  
  <p>And here's the View I'm getting, it still has separator lines.  I get the feeling that this is some small change, but I'm not sure why separator lines are showing up?</p>
  
  <p><img src="https://i.stack.imgur.com/St3pF.png" alt="enter image description here"></p>