struct dataInfo : Decodable {
var name : String?
var logo : String?
}
var data : [dataInfo] = []
class VeriTableViewCell: UITableViewCell {
@IBOutlet weak var namelabel: UILabel!
@IBOutlet weak var logolabel: UILabel!
var name : String? = ""
var logo : String? = ""
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "vericell", for: indexPath) as! VeriTableViewCell
cell.name = data[indexPath.row].name
cell.logo = data[indexPath.row].logo
return cell
}
I m new on ios, still trying to learn. I created a model, fetched and decoded the data to the struct. while trying to show data on storyboard, getting uitableviewcell error I checked connections and built labels back and I got same error again.
'[<UITableViewCell 0x135024c00> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key logolabel.