Заполнение UITableView
первым из файла JSON.Кажется, что все загружается и нет сбоев, но ячейки таблицы не содержат все данные.Они обрезаны внизу.
HeroViewController
class HeroViewController: UIViewController, UITableViewDataSource, UITableViewDelegate, WCSessionDelegate {
// code
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return messageObject.count
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let tableCell : HeroTableViewCell = tableView.dequeueReusableCell(withIdentifier: "MessageCell") as? HeroTableViewCell ?? HeroTableViewCell(style: UITableViewCell.CellStyle.default, reuseIdentifier: "MessageCell")
let row = indexPath.row
let rowObj = messageObject[row]
tableCell.one.text = rowObj.title as String?
tableCell.two.text = rowObj.speaker as String?
tableCell.three.text = rowObj.from as String?
tableCell.four.text = rowObj.to as String?
return tableCell
}
}