12345678910111213141516171819202122232425262728293031323334 |
- //
- // HomeFoodItem.swift
- // ADHTuanCan
- //
- // Created by 敖德亨 on 2023/9/28.
- //
- import UIKit
- class HomeFoodItem: UICollectionViewCell {
-
- @IBOutlet weak var foodImg: UIImageView!
-
- @IBOutlet weak var nameLab: UILabel!
-
- @IBOutlet weak var priceLab: UILabel!
- override func awakeFromNib() {
- super.awakeFromNib()
-
- }
- func configData(dataModel : HomeFoodDetailModel){
-
- self.foodImg.sd_setImage(url: URL.init(string: dataModel.link ?? "") ,placeHolderImage: UIImage.init(named: "placeHolderImage"))
- self.nameLab.text = dataModel.name
- self.priceLab.text = "s$\(dataModel.price ?? "")"
- }
-
-
- }
|