I want to put 2 custom cell in TableView
, but I have a small problem with it. I tried to find answer in Google and StackOverflow, but answers can't help me.
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
if indexPath.row == 0{
var cell: CustomCell = tableView.dequeueReusableCellWithIdentifier("FistCustomTableViewCell", forIndexPath: indexPath) as CustomCell
//set cell2
}
if indexPath.row >= 1{
var cell: CustomCell = tableView.dequeueReusableCellWithIdentifier("CustomTableViewCell", forIndexPath: indexPath) as CustomCell
let cons = aArray[indexPath.row - 1]
// set cell2
}
return cell // (!) Use of unresolved identifier "cell"
}