I have a UITableView that I created on a UIStoryboard that has two dynamic prototypes of UITableViewCells:

The screenshot will show you that I have the first UITableViewCell style set in Subtitle, and the second one is custom with the label “Tap to Add” in the center. The first has the identifier "Cell" and the second is "AddCell". I set up the UITableViewController (I also tried the UITableView in the UIViewController), a subclass of the UITableViewCell in Swift, and I connected all of my outputs. However, when I run the simulator, the cell loads and it is available, but I could not display its contents. (I tried to add other controls, but nothing will appear when the cell is loaded. The only thing I can change is the contentView backgroundColor.)
I have the following Swift code for a UITableViewController:
import UIKit class ListTableViewController: UITableViewController { var listObjects: ListObject[] = DataManager.instance.allListObjects() as ListObject[] init(style: UITableViewStyle) { super.init(style: style) // Custom initialization } init(coder aDecoder: NSCoder!) { super.init(coder: aDecoder) } override func viewDidLoad() { super.viewDidLoad() self.tableView.registerClass(AddListObjectTableViewCell.classForCoder(), forCellReuseIdentifier: "AddCell") } @IBAction func editButtonPressed(editButton: UIBarButtonItem) { if (self.tableView.editing) { editButton.title = "Edit" self.tableView.setEditing(false, animated: true) } else { editButton.title = "Done" self.tableView.setEditing(true, animated: true) } } //
I also have the following Swift for my UITableViewCell:
import UIKit class AddListObjectTableViewCell: UITableViewCell { @IBOutlet var addLabel : UILabel init(style: UITableViewCellStyle, reuseIdentifier: String) { super.init(style: style, reuseIdentifier: reuseIdentifier)
Finally, here is a screenshot of the simulator with an empty cell visible when selected: 
I double-checked everything related to my conclusions that the class names were set correctly in Interface Builder, I registered the class of my UITableViewCell with tableView, and everything seems to be configured correctly. Is it possible that this is a mistake? Any help would be greatly appreciated.
swift
Aron c
source share