新的iOS編程,我收到以下錯誤,我得到它3個單獨的項目,但解決之一將解決它們。'UITableViewCell'類型的值有沒有成員'postImageView'
我收到以下錯誤
價值型「的UITableViewCell」沒有成員「postImageView」
// return how may records in a table
override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return self.rssRecordList.count
}
// return cell
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> NewsTableViewCell {
// collect reusable cell
let cell = tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath)
// find record for current cell
let thisRecord : RssRecord = self.rssRecordList[(indexPath as NSIndexPath).row]
// set value for main title and detail tect
cell.postImageView.image = UIImage(thisRecord.image)
cell.postTitleLabel.text = thisRecord.title
cell.authorLabel.text = thisRecord.storyDate
// return cell
return cell as! NewsTableViewCell
}