younger_times
2023-07-05 c5e94788e59723d189642e8489423ea64271340b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
//
//  SearchStoreDetailFeedbackVC.swift
//  WanPai
//
//  Created by 无故事王国 on 2023/6/30.
//
 
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
    }
}