CNLiveGoodsDetailsTableViewCell.swift
1.02 KB
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
//
// CNLiveGoodsDetailsTableViewCell.swift
// metaCode
//
// Created by zx on 2024/3/12.
//
import Foundation
import YYImage
class CNLiveGoodsDetailsTableViewCell:UITableViewCell{
var displayImageView:YYAnimatedImageView?
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
self.selectionStyle = .none
self.initUI()
self.initLayout()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
// MARK: - initUI
func initUI(){
self.displayImageView = YYAnimatedImageView()
self.displayImageView?.contentMode = .scaleAspectFill
self.displayImageView?.clipsToBounds = true
self.contentView.addSubview(self.displayImageView!)
}
// MARK: - initLayout
func initLayout(){
self.displayImageView!.snp.makeConstraints({ make in
make.left.top.right.bottom.equalTo(self)
})
}
}