title: cellForRowAtIndexPath is not being called from custom class
body: <p>I'm using Xcode 7.0, Swift 2</p>
  
  <p>I'm basically trying to create a custom class that will build a <code>UITable</code>, then in the <code>ViewController</code> I make a new object of the table and load it into self.view;</p>
  
  <p>The problem I'm having is that the function <code>func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -&gt; UITableViewCell</code> isn't being called at all from within the custom class. I've been looking for a solution for 3 days now and I've tried rebuilding the App and code several times with no luck.</p>
  
  <p>Please note, if I use the same code (that is everything required to build the table; excluding init functions, etc) in the ViewController.swift file, it works fine.</p>
  
  <p>I know the problem is with the <code>cellForRowAtIndexPath</code> function because it will not print out the statement I set in that block of code when it runs. All other functions are called, but for some reason this isn't being called. Not sure if I overlooked something here. Any help would be appreciated. Thanks in advance.</p>
  
  <pre><code>class sideTest: NSObject, UITableViewDelegate, UITableViewDataSource {
  
  
      let tesTable: UITableView = UITableView()
      var items: [String]?
      var mView: UIView = UIView()
  
      func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -&gt; Int {
          print("The number of rows is: \(self.items!.count)")
  
          return self.items!.count
      }
  
      func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -&gt; UITableViewCell {
  
          print("\nLets create some cells.")
  
          let sCell: UITableViewCell = tableView.dequeueReusableCellWithIdentifier("cell") as UITableViewCell!
  
          sCell.textLabel?.text = self.items![indexPath.row]
          sCell.textLabel?.textColor = UIColor.darkTextColor()
  
          return sCell
      }
  
      func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
          print("You selected cell #\(indexPath.row)!")
      }
  
      func tblSetup() {
  
          self.tesTable.frame = CGRectMake(0, 0, 320, mView.bounds.height)
          self.tesTable.delegate = self
          self.tesTable.dataSource = self
  
          self.tesTable.backgroundColor = UIColor.cyanColor()
  
          // load cells
          self.tesTable.registerClass(UITableViewCell.self, forCellReuseIdentifier: "Cell")
          self.tesTable.reloadData()
  
          print("Currenlty in tblSetup.\nCurrent rows is: \(self.items!.count)")
      }
  
      //Init
  
      override init() {
          super.init()
  
          self.items = nil
  
          self.tblSetup()
      }
  
      init(sourceView: UIView , itemListAsArrayString: [String]) {
          super.init()
  
          self.items = itemListAsArrayString
          self.mView = sourceView
  
          self.tblSetup()
      }
  }
  </code></pre>
  
  <p>Here is the code from ViewController.swift; Please do note that the table gets built, but the cells do not populate, even if I manually enter cell info by doing: <code>sCell.textLabel?.text = "test cell"</code></p>
  
  <pre><code>class ViewController: UIViewController {
  
  
  
      override func viewDidLoad() {
          super.viewDidLoad()
          // Do any additional setup after loading the view, typically from a nib.
  
          let myTable: sideTest = sideTest(sourceView: self.view, itemListAsArrayString: ["Cell 1", "Cell 2", "Cell 3"])
          self.view.addSubview(myTable.tesTable)
      }
  
      override func didReceiveMemoryWarning() {
          super.didReceiveMemoryWarning()
          // Dispose of any resources that can be recreated.
      }   
  }
  </code></pre>
  
  <p>Again, any help is greatly appreciated. Thanks.</p>
  
  <p><a href="https://i.stack.imgur.com/snF8o.png" rel="noreferrer"><img src="https://i.stack.imgur.com/snF8o.png" alt="enter image description here"></a></p>