younger_times
2023-07-05 c5e94788e59723d189642e8489423ea64271340b
WanPai/Root/Search/VC/SearchStoreDetailFeedbackVC.swift
@@ -8,10 +8,51 @@
import UIKit
class SearchStoreDetailFeedbackVC: BaseVC {
    @IBOutlet weak var stackView: UIStackView!
    @IBOutlet weak var collectionView: UICollectionView!
    override func viewDidLoad() {
        super.viewDidLoad()
        title = "门店评价"
        collectionView.delegate = self
        collectionView.dataSource = self
        collectionView.register(UINib(nibName: "UploadImgCCell", bundle: nil), forCellWithReuseIdentifier: "_UploadImgCCell")
    }
    @IBAction func startAction(_ sender: UIButton) {
        let tag = sender.tag
        for v in (stackView.arrangedSubviews as! [UIButton]){
            v.isSelected = v.tag <= tag
        }
    }
}
extension SearchStoreDetailFeedbackVC:UICollectionViewDelegate{
}
extension SearchStoreDetailFeedbackVC:UICollectionViewDataSource{
    func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
       let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "_UploadImgCCell", for: indexPath) as! UploadImgCCell
        return cell
    }
    func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
        return 2
    }
}
extension SearchStoreDetailFeedbackVC:UICollectionViewDelegateFlowLayout{
    func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
        return CGSize(width: 60, height: 60)
    }
    func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumLineSpacingForSectionAt section: Int) -> CGFloat {
        return 0.01
    }
    func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumInteritemSpacingForSectionAt section: Int) -> CGFloat {
        return 0.01
    }
}