宽窄优行-由【嘉易行】项目成品而来
younger_times
2023-07-05 0d8f5fc8a516bfd07e425909e4a4432600572ee7
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
59
60
61
62
63
64
65
//
//  YYRatingStartCell.swift
//  OKProject
//
//  Created by alvin_y on 2020/9/23.
//  Copyright © 2020 yangwang. All rights reserved.
//
 
import UIKit
import HCSStarRatingView
class YYRatingStartCell: UITableViewCell {
 
    @IBOutlet weak var button_detail: UIButton!
    @IBOutlet weak var label_amount: UILabel!
    @IBOutlet weak var view_star: HCSStarRatingView!
    /// 评价右边约束
    @IBOutlet weak var evaluationRightContraint: NSLayoutConstraint!
    
    /// 评价高度约束
    @IBOutlet weak var evaluationConstraint: NSLayoutConstraint!
    
    /// 评价左边约束
    @IBOutlet weak var evaluationLeftContraint: NSLayoutConstraint!
    @IBOutlet weak var tagsView: HXTagsView!
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
        let attributedString = AttributedStringbuilder.build()
            .add(string: "查看收费明细", withFont: UIFont.systemFont(ofSize: 12, weight: .medium), withColor: #colorLiteral(red: 0, green: 0, blue: 0, alpha: 0.6)).underLine()
            .mutableAttributedString
        button_detail.setAttributedTitle(attributedString, for: .normal)
        
        tagsView.layout.scrollDirection = .vertical
        tagsView.backgroundColor = UIColor.clear
        tagsView.tagAttribute.selectedBackgroundColor = UIColor.white
        tagsView.tagAttribute.borderColor = UIColor.color(hexString: "#CCCCCC")
        tagsView.tagAttribute.selectedBorderColor = UIColor.clear
        tagsView.tagAttribute.selectedTextColor = UIColor.white
        tagsView.tagAttribute.textColor = UIColor.color(hexString: "#27282D",0.6)
        tagsView.tagAttribute.titleSize = 10
        tagsView.tagAttribute.tagSpace = 12
        tagsView.tagAttribute.cornerRadius = 2
        let size = CGSize(width: 50, height: 27)
        tagsView.layout.itemSize = size
        tagsView.isMultiSelect = true
        tagsView.layout.sectionInset = UIEdgeInsets.init(top: 6, left: 14, bottom: 6, right: 14)
        
    }
 
 
    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)
 
        // Configure the view for the selected state
    }
    
}
extension YYRatingStartCell {
    
    static func makeByXIB() -> YYRatingStartCell {
        let view = Bundle.main.loadNibNamed(String(describing: YYRatingStartCell.self), owner: nil, options: nil)!.first as! YYRatingStartCell
        view.selectionStyle = .none
        return view
    }
}