I have to show the int value in the label, but such an error occurs in the cell. This code is a cell code and a model code. And there is also an error 'Cannot assign value of type 'String' to type 'UIImage''. How do I solve this error?
var RankingData: RankingModel! {
didSet { setUpView() }
}
private func setUpView() {
self.RankingLbl?.text = RankingData.ranking
self.profileImage?.image = RankingData.profileImage
self.nickNameLbl?.text = RankingData.nickName
}
This is my cell code
self.RankingLbl?.text = RankingData.ranking error : Cannot assign value of type 'Int' to type 'String'
self.profileImage?.image = RankingData.profileImage error : Cannot assign value of type 'String' to type 'UIImage'
var ranking: Int = -1
var nickName: String = ""
var profileImage: String = ""
enum RankingModelKeys: String, CodingKey {
case ranking
case nickName
case profileImage
}
}
This is my model code