SetMealCollectionItem.swift 677 B

1234567891011121314151617181920212223242526272829
  1. //
  2. // SetMealCollectionItem.swift
  3. // ADHTuanCan
  4. //
  5. // Created by 敖德亨 on 2023/10/26.
  6. //
  7. import UIKit
  8. class SetMealCollectionItem: UICollectionViewCell {
  9. @IBOutlet weak var selectImg: UIImageView!
  10. @IBOutlet weak var foodImg: UIImageView!
  11. @IBOutlet weak var nameLab: UILabel!
  12. override func awakeFromNib() {
  13. super.awakeFromNib()
  14. }
  15. func configData(model : MealFoodMsgModel){
  16. self.foodImg.sd_setImage(url: URL.init(string: model.link ?? "") ,placeHolderImage: UIImage.init(named: "placeHolderImage"))
  17. self.nameLab.text = model.name
  18. self.selectImg.isHidden = !model.selected
  19. }
  20. }