title: Popover tableview Controller not showing Data Swift
body: <p>My Popover Controller is popping up with a blank TableView and I have no idea why. I have tried changing the color of the cell and view and this doesn't even seem to show up when I click the popover.</p>
  
  <p>Here is the code for initiating the popover:</p>
  
  <pre><code>@IBAction func popOverButton(_ sender: UIButton)
  {
  
      let controller = TableViewController()
      controller.modalPresentationStyle = .popover
      // configure the Popover presentation controller
      let popController: UIPopoverPresentationController? = controller.popoverPresentationController
      popController?.permittedArrowDirections = [.down]
      popController?.delegate = self
      popController?.sourceView = sender
      popController?.sourceRect = sender.bounds
      popController?.backgroundColor = .white
      self.parent?.present(controller, animated: true, completion: { })
  
  }
  
      func adaptivePresentationStyle(for controller: UIPresentationController) -&gt; UIModalPresentationStyle
  {
      return UIModalPresentationStyle.none
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/vyF2I.png" rel="nofollow noreferrer">This Code Shows This</a></p>
  
  <p>Here is my code for my Tableview controller, I had tried the other method before of making a regular ViewController putting a tableview on to  it but that yielded the same results.
      import UIKit</p>
  
  <pre><code>class TableViewController: UITableViewController {
  var categories = PTTableView().titles
  //PTTableview.titles is a populated array from another viewcontroller     and it is not empty
  @IBOutlet var tableiViewOne: UITableView!
  
  override func viewDidLoad()
  {
      super.viewDidLoad()
  }
  
  override func numberOfSections(in tableView: UITableView) -&gt; Int
  {
      return 0
  }
  
  override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -&gt; Int
  {
              return categories.count
  }
  
  override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -&gt; UITableViewCell
  {
  
  
      let cell = tableiViewOne.dequeueReusableCell(withIdentifier: "myCell", for: indexPath) as! PopOverTableViewCell
  
      cell.cellLabelOne.text = categories[indexPath.row]
  
      return cell
  }
  
  }
  </code></pre>
  
  <p>And yes the tableviewcontroller on the storyboard is set to the TableViewController.</p>
  
  <p>UPDATE:
  I Have Changed the number of sections on the tableviewcontroller to 1 and now my app is crashing saying fatal error: unexpectedly found nil while unwrapping an Optional value
  (lldb) 
  Highlighting </p>
  
  <pre><code>let cell = tableiViewOne.dequeueReusableCell(withIdentifier: "myCell", for: indexPath) as! PopOverTableViewCell
  </code></pre>
  
  <p>I have the same cell name on the storyboard and It is set to the same class</p>