0
enter image description here斯威夫特的TableView缺少返回
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
if indexPath.row == 1
{
let cell = Bundle.main.loadNibNamed("KonuDetayKonuTableViewCell", owner: self, options: nil)?.first as! KonuDetayKonuTableViewCell
cell.lblBaslik.text = arrayYorumData[indexPath.row].baslik
cell.lblKullaniciAdiVeTarih.text = arrayYorumData[indexPath.row].uye + " - " + arrayYorumData[indexPath.row].tarih
cell.lblYazi.text = arrayYorumData[indexPath.row].yazi
cell.updateConstraintsIfNeeded()
if singleton.username != arrayYorumData[indexPath.row].uye{
cell.btnDüzenle.isHidden = true
}
return cell
}
}
嗨,我在這裏得到一個錯誤。我該如何解決這個問題? 我沒有與以前的版本有問題,但我開始 在我的版本剛剛更新
想一想:如果'indexPath.row!= 1'會怎麼樣? –
謝謝,問題解決了:) – user7337400