//
|
// 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)
|
}
|
|
|
|
}
|