```
import UIKit

class ViewController: UIViewController, UITableViewDataSource, UITableViewDelegate {
    final let url = URL(string : "https://simplifiedcoding.net/demos/view-flipper/heroes.php")
    var Heroes1 = [Hero]()

    @IBOutlet weak var tableView: UITableView!
    //@IBOutlet weak var table: Actorcell!

    override func viewDidLoad() {
        super.viewDidLoad()
        tableView.delegate = self
        tableView.dataSource = self
        self.tableView.register(UITableViewCell.self, forCellReuseIdentifier: "cell")
        downloadJson()
        // Do any additional setup after loading the view, typically from a nib.
    }

    func downloadJson() {
        guard let downloadurl = url else{ return }
        URLSession.shared.dataTask(with: downloadurl) { data, urlresponse, error in
            guard let data = data, error == nil, urlresponse != nil else{
                print("Something Wrong")
                return
            }
            //print("downloaded")
            do{
                let decoder = JSONDecoder()
                let downloadedActor = try decoder.decode(Heroes.self, from: data)
                self.Heroes1 = downloadedActor.heroes
                print(downloadedActor)
                DispatchQueue.main.async {
                    self.tableView.reloadData()
                }
            }
            catch{
                print(error)
               print("Something Went Wrong")
            }
        }.resume()
    }

    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
        return Heroes1.count
    }

    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
        //let cell = tableView.dequeueReusableCell(withIdentifier:" HotelCell") as! ActorCell!
        let cell = self.tableView.dequeueReusableCell(withIdentifier: "cell") as! Herocell?
        cell?.nameLbl.text = Heroes1[indexPath.row].name
        print(Heroes1[indexPath.row].name)
        if let imageURL = URL(string: Heroes1[indexPath.row].imageurl) {
            DispatchQueue.global().async {
                let data = try? Data(contentsOf: imageURL)
                if let data = data {
                    let image = UIImage(data: data)
                    DispatchQueue.main.async {
                        cell?.imgLbl.image = image
                        print(image)
                    }
                }
            }
        }
        return UITableViewCell()
    }
}

```

> 
> Could not cast value of type 'UITableViewCell' (0x1057a2038) to
>  'actors.Herocell' (0x1014a3f40). 2018-12-19 12:58:55.871615+0530
>  actors[3761:187113] Could not cast value of type 'UITableViewCell'
>  (0x1057a2038) to 'actors.Herocell' (0x1014a3f40).
> 
> 
> 

Thanks in advance. complete project link : <https://www.dropbox.com/sh/mlabuhk6mllwbzs/AADoHjZxg2e8AtQB9xfTrZMGa?dl=0>