Value of type 'UITableViewCell' has no member 'postImageView'

后端 未结 3 923
余生分开走
余生分开走 2021-01-25 22:26

New to iOS programming, I am getting the following error, I get it for 3 separate items, but solving one will solve them all.

I am getting the following error

Va

3条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-25 23:16

    The problem is that your cell object is a UITableViewCell and not a NewsTableViewCell. You need to dequeue a NewsTableViewCell that will actually have those properties on it.

    Something like:

    var cell = tableView.dequeueReusableCellWithIdentifier("cell", forIndexPath: indexPath) as! NewsTableViewCell
    

提交回复
热议问题