import UIKit
class Categorycell: UITableViewCell {
@IBOutlet weak var categoryImage : UIImage!
@IBOutlet weak var categoryTitle : UILabel!
func updateViews(category: category) {
categoryImage.images = UIImage(named: category.imageName)
categoryTitle.text = category.title
}
}
答案 0 :(得分:1)
尝试更改@IBOutlet weak var categoryImage : UIImage!
到@IBOutlet weak var categoryImage : UIImageView!