0
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.

Paulw11
  • 108,386
  • 14
  • 159
  • 186
kocaman
  • 11
  • 1
  • It's a dead connection. You renamed `logolabel` as `logo`. Go to the storyboard and delete the connection. – vadian Jul 04 '23 at 18:24
  • You haven't set the custom class for the cell in your storyboard, so you are getting an instance of `UITableViewCell`, which doesn't have your outlet properties instead of the class you created. – Paulw11 Jul 04 '23 at 20:03

0 Answers0