I have the following:
I used a .xib file for the cell, which
Read the other comments about really wanting to use an alternate approach before trying this, but using this extension will allow you to get to the dataSource and delegate both of which should be the UITableViewController
extension UITableViewCell {
var tableView:UITableView? {
get {
for var view = self.superview ; view != nil ; view = view!.superview {
if view! is UITableView {
return (view! as UITableView)
}
}
return nil
}
}
var tableViewDataSource:UITableViewDataSource? {
get {
return self.tableView?.dataSource
}
}
var tableViewDelegate:UITableViewDelegate? {
get {
return self.tableView?.delegate
}
}
}