unresolved identifier in Swift -
i can not resolve problem in swift , xcode
error swift use of unresolved identifier
// configure cell...
cell.textlabel?.text = restaurantnames[indexpath.row] cell.thumbnailimageview.image = uiimage(named: restaurantimages [indexpath.row]) return cell }
in cellforrowatindexpath
method, have identify tableviewcell storyboard id, in case cell
override func viewdidload() { tableview.registerclass(customtableviewcell.self, forcellreuseidentifier: "cell") } func tableview(tableview: uitableview, cellforrowatindexpath indexpath: nsindexpath)->uitableviewcell { var cell:customtableviewcell? = tableview.dequeuereusablecellwithidentifier("cell", forindexpath: indexpath) as? customtableviewcell cell!.textlabel?.text = restaurantnames[indexpath.row] cell!.thumbnailimageview.image = uiimage(named: restaurantimages [indexpath.row]) return cell! }
Comments
Post a Comment