Robert
2 天以前 d23fce7c9da9f47cb4bb4630c3b428b12ce1c7eb
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
//
//  MemberCell.swift
//  WanPai
//
//  Created by Robert on 2025/8/20.
//
 
import UIKit
 
class MemberCell: UICollectionViewCell {
 
    @IBOutlet weak var nameLab: UILabel!
    
    @IBOutlet weak var moneyLab: UILabel!
    
    @IBOutlet weak var timeLab: UILabel!
    
    @IBOutlet weak var backView: UIView!
    
    
    override func awakeFromNib() {
        super.awakeFromNib()
        backView.layer.shadowColor = UIColor.black.cgColor
        backView.layer.shadowOffset = CGSize(width: 0, height: 2)  // 阴影偏移量
        backView.layer.shadowOpacity = 0.25                       // 阴影透明度 (0.0 - 1.0)
        backView.layer.shadowRadius = 10                          // 阴影模糊半径
        backView.layer.masksToBounds = false
        backView.layer.cornerRadius = 10
        noSeleceltView()
    }
    
    func seleceltView(){
        let color = UIColor(red: 255/250, green: 116/250, blue: 0, alpha: 1)
        backView.layer.borderColor = color.cgColor
        backView.layer.borderWidth = 2
        nameLab.textColor = color
        moneyLab.textColor = color
        timeLab.textColor =  UIColor(red: 0, green: 0, blue: 0, alpha: 0.6)
    }
    
    
    func noSeleceltView(){
       
        backView.layer.borderColor = UIColor.black.cgColor
        backView.layer.borderWidth = 1
        nameLab.textColor = .black
        moneyLab.textColor = .black
        timeLab.textColor =  UIColor(red: 0, green: 0, blue: 0, alpha: 0.4)
    }
    
    
 
}