I am following a course and am trying so test myself.
I have a model and I give values to properties from a json-file.
(If Im showing code wrong please tell me how I shoud do it)
This works:
func updateUIWithWeatherData() {
cityLabel.text = weatherDataModel.city
temperatureLabel.text = String(weatherDataModel.temperature)
weatherIcon.image = UIImage(named: weatherDataModel.weatherIconName)
}
But here it doesn't. Test shows but not the city.
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = UITableViewCell(style: .default, reuseIdentifier: "Cell")
cell.textLabel?.text = weatherDataModel.city
//cell.textLabel?.text = "test"
return cell
}