пользовательская ячейка таблицы не отображается - PullRequest
0 голосов
/ 15 апреля 2020
import UIKit

class anasayfaVC: UIViewController, UITableViewDataSource , UITableViewDelegate {

    @IBOutlet weak var tableView1: UITableView!

    override func viewDidLoad() {
        super.viewDidLoad()
        tableView1.delegate = self
        tableView1.dataSource = self
}
    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
        return 5
    }

    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
        let cell = tableView.dequeueReusableCell(withIdentifier: "Cell", for: indexPath) as! FeedCell
        cell.deneme.image = UIImage(named: "naruto")
        return cell
    }

}

1 Ответ

0 голосов
/ 15 апреля 2020

Вы зарегистрировали свой просмотр таблицы как

    tableView.register(UINib(nibName: "FeedCell", bundle: nil), forCellReuseIdentifier: "Cell") ?
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...