Vote count:
0
I am trying to add a TableView inside my UITableViewCellController like this:
To add content to the cells i'm doing this:
override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
if (tableView == groupPicker) {
var cell = UITableViewCell(style: UITableViewCellStyle.Default, reuseIdentifier: nil)
cell.textLabel?.text = "\(groups[indexPath.row]) - \(sets[indexPath.row]) Set\(ending(sets[indexPath.row]))"
return cell
}
let cell = super.tableView.cellForRowAtIndexPath(indexPath)
return cell!
}
I get this error:
fatal error: unexpectedly found nil while unwrapping an Optional value (lldb)
on this line:
let cell = super.tableView.cellForRowAtIndexPath(indexPath)
Is there another way to do this, or am I doing something from?
Thanks in advance
asked 35 secs ago
Swift - UITableView inside Cell from UITableViewController
Aucun commentaire:
Enregistrer un commentaire