title: Cells in table view not being displayed
body: <p>I am using a UITableView in one of my view controllers and am using a custom class called ListCell. The table view and the cells are being displayed, but the content in the cells are not being displayed, so the cell is empty. But if I press the cell it performs its task. So the content is there but its not being displayed. I think it has something to do with how I registered the class to the custom type ListCell. Here is how I declared it in viewDidLoad...</p>
  
  <pre><code>self.tblListView.registerClass(ListCell.self, forCellReuseIdentifier: "Cell")
  </code></pre>
  
  <p>Is there something wrong with the above line. And what it is causing the cell content to not being displayed?</p>
  
  <p>Also I tried enabling size classes and that did not work. Also all the cells are being created programmatically. </p>
  
  <p>The below line of code is responsible for displaying the cell data.</p>
  
  <pre><code>cell.displayAlertData(mutArrAlertList.objectAtIndex(indexPath.row) as! [NSObject : AnyObject])
  </code></pre>
  
  <p>the thing is mutArrAlertList's object at the first index is an optional type Optional(Temperature). I think the only way this will work if it is not optional. The object is being passed my a push notification, and what the push notification sends is not optional. So somewhere it randomly turns into an optional type. Is there a way I can get rid of that optional value around it?</p>
  
  <p>Here is cell for row method:</p>
  
  <pre><code>func tableView (tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -&gt; UITableViewCell {
  
      let cellIdentifier: String = "Cell"
  
      var cell = tableView.dequeueReusableCellWithIdentifier("Cell") as! ListCell
  
      //if cell == nil
      //{
          //let nib: NSArray = NSBundle.mainBundle().loadNibNamed("ListCell", owner: self, options: nil)
          //cell = (nib.objectAtIndex(0) as? ListCell)!
  
      //}
  
      cell.selectionStyle = UITableViewCellSelectionStyle.None
  
      print("")
      print("This is cell: \(mutArrAlertList.objectAtIndex(indexPath.row) as! [NSObject : AnyObject])") //did this to check what the value is and it is an optional
  
      cell.displayAlertData(mutArrAlertList.objectAtIndex(indexPath.row) as! [NSObject : AnyObject])
  
      if indexPath.row == mutArrAlertList.count-1
      {
          if ApplicationDelegate.intPage &gt; mutArrAlertList.count
          {
              //do nothing
          }
          else
          {
              ApplicationDelegate.intPage = ApplicationDelegate.intPage + 10
              self.reloadDataFromdb()
  
          }
      }
  
      return cell
  }
  </code></pre>