| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- //
- // QSLVipCommentCellView.swift
- // QuickSearchLocation
- //
- // Created by Destiny on 2024/11/28.
- //
- import UIKit
- class QSLVipCommentCellView: UIView {
-
- lazy var avatarImageView: UIImageView = {
-
- let imageView = UIImageView()
- imageView.image = UIImage(named: "friends_cell_other_avatar")
- return imageView
- }()
-
- lazy var nameLabel: UILabel = {
-
- let label = UILabel()
- label.text("用户198****1259")
- label.mediumFont(15)
- label.textColor = QSLColor.Color_202020
- return label
- }()
-
- lazy var commentLabel: UILabel = {
-
- let label = UILabel()
- label.numberOfLines = 0
- label.text("上班没时间,远程遛娃,非常方便很好用。")
- label.font(15)
- label.textColor = .hexStringColor(hexString: "#404040")
- return label
- }()
-
- override init(frame: CGRect) {
- super.init(frame: frame)
-
- self.addSubview(avatarImageView)
- avatarImageView.snp.makeConstraints { make in
- make.size.equalTo(CGSize(width: 32.rpx, height: 32.rpx))
- make.left.equalTo(12.rpx)
- make.top.equalTo(0.rpx)
- }
-
- self.addSubview(nameLabel)
- nameLabel.snp.makeConstraints { make in
- make.left.equalTo(avatarImageView.snp.right).offset(8.rpx)
- make.centerY.equalTo(avatarImageView.snp.centerY)
- }
-
- self.addSubview(commentLabel)
- commentLabel.snp.makeConstraints { make in
- make.left.equalTo(avatarImageView.snp.right).offset(8.rpx)
- make.right.equalTo(-12.rpx)
- make.top.equalTo(nameLabel.snp.bottom).offset(8.rpx)
- }
- }
-
- required init?(coder: NSCoder) {
- fatalError("init(coder:) has not been implemented")
- }
-
- func config(name: String, comment: String) {
-
- self.nameLabel.text = name
- self.commentLabel.text = comment
- }
- }
|