i\'m trying to return different cells in a tableView. Normally in this case i would return different cells and then return nil at the bottom, but in this case it gives me an
You mustn't return nil from cellForRowAtIndexPath. You always should return a valid cell.
var cell: UITableViewCell!
This line of code doesn't create any cell, it just a UITableViewCell variable with nil content, you have to assign a value to it:
var cell: UITableViewCell = tableView.dequeueReusableCellWithIdentifier("Cell", forIndexPath: indexPath) as UITableViewCell
return cell