import UIKit class MainTableView: UITableView, UITableViewDelegate, UITableViewDataSource{ var name: [Notes] = [Notes(nameText: "Первая заметка", mainText: "Это ее текст"), Notes(nameText: "Вторая заметка", mainText: "Это ее текст"), Notes(nameText: "Третья заметка", mainText: "Это ее текст")] func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = self.dequeueReusableCell(withIdentifier: "lessImage", for: indexPath) as! TableViewCellLessImage cell.nameText.text = name[indexPath.row].nameText cell.mainText.text = name[indexPath.row].mainText return cell } func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return name.count } func numberOfSections(in tableView: UITableView) -> Int { return 1 } func tableView(_ tableView: UITableView, estimatedHeightForRowAt indexPath: IndexPath) -> CGFloat { return 66 } /* // Only override draw() if you perform custom drawing. // An empty implementation adversely affects performance during animation. override func draw(_ rect: CGRect) { // Drawing code } */ } myProgram.MainViewController tableView: numberOfRowsInSection:]: unrecognized selector sent to instance 0x7fc9d050b440