Swift: Tabellenansicht Superklasse Fehler
Ich habe mit Swift ein Slide-Out-Menü erstellt. Ich habe das schon oft gemacht, aber als ich es heute erstellt habe, erhalte ich diese Fehlermeldung (siehe Screenshot). Es könnte einfach ein Fehler sein, den ich gemacht habe.
Hier ist der Code, von dem ich denke, dass er das Problem verursacht:
override func tableView(tableView: UITableView!, cellForRowAtIndexPath indexPath: NSIndexPath!) -> UITableViewCell! {
var cell:UITableViewCell? = tableView.dequeueReusableCellWithIdentifier("Cell")! as UITableViewCell
if cell == nil{
cell = UITableViewCell(style: UITableViewCellStyle.Default, reuseIdentifier: "Cell")
cell!.backgroundColor = UIColor.clearColor()
cell!.textLabel!.textColor = UIColor.darkTextColor()
let selectedView:UIView = UIView(frame: CGRect(x: 0, y: 0, width: cell!.frame.size.width, height: cell!.frame.size.height))
selectedView.backgroundColor = UIColor.blackColor().colorWithAlphaComponent(0.3)
cell!.selectedBackgroundView = selectedView
}
cell!.textLabel!.text = tableData[indexPath.row]
return cell
}
Bildschirmfoto
UPDATE: Ich habe versucht, @ zu entfernoverride
Hoffentlich kann jemand helfen!