I want to show two different maps in a tableview, and I have used this code previously, but now Xcode complains that the cell has no members nameLabel
, addressLabel
. Am I missing something?
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
var cell: UITableViewCell!
if indexPath == 0 {
cell = tableView.dequeueReusableCellWithIdentifier("Cell", forIndexPath: indexPath) as! SummaryHeaderTableViewCell
cell.nameLabel.text = ""
cell.addressLabel.text = ""
cell.cityLabel.text = ""
let inspectionDate: String = detailItem!["dato"] as! String
cell.inspectionDateLabel.text = self.convertDateString(inspectionDate)
}
else
{
cell = tableView.dequeueReusableCellWithIdentifier("MapCell", forIndexPath: indexPath) as! MapTableViewCell
// Set map options
}
return cell
}