I have one array of png images.
iconeImage = [UIImage(named:"ion-home")!,UIImage(named:"ms-medkit")!,UIImage(named:"ion-edit")!,UIImage(named:"ion-clipboard")!,UIImage(named:"ion-clipboard")!,UIImage(named:"ion-waterdrop")!,UIImage(named:"ion-calendar")!]
and I have one function for table-view which set the image with this array elements
here is the code
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "MenuTableViewCell") as! MenuTableViewCell
cell.imgIcon.image = iconeImage[indexPath.row]
return cell
}
But it gives me error that iconeImage has nil values. so can you suggest me solutions. I am beginner in swift 3
Here is the screenshot
![two muppets][1]