| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- //
- // QSLMineInfoView.swift
- // QuickSearchLocation
- //
- // Created by Destiny on 2024/4/15.
- //
- import UIKit
- class QSLMineInfoView: UIView {
-
- lazy var infoAvatarImageView: UIImageView = {
-
- let imageView = UIImageView()
- imageView.image = UIImage(named: "mine_info_avatar")
- return imageView
- }()
-
- lazy var infoNameLabel: UILabel = {
-
- let label = UILabel()
- label.boldFont(18)
- label.textColor = QSLColor.Color_202020
- label.text = "54K55Ye755m75b2V".decode
- return label
- }()
-
- lazy var infoContentLabel: UILabel = {
-
- let label = UILabel()
- label.font(13)
- label.textColor = QSLColor.textColor_A7
- label.text = "解锁更多精彩内容"
- return label
- }()
-
- override init(frame: CGRect) {
- super.init(frame: frame)
-
- setUI()
- }
-
- required init?(coder: NSCoder) {
- fatalError("init(coder:) has not been implemented")
- }
-
- func config(name: String, content: String) {
- self.infoNameLabel.text = name
- self.infoContentLabel.text = content
- }
- }
- extension QSLMineInfoView {
-
- func setUI() {
-
- addSubview(infoAvatarImageView)
- addSubview(infoNameLabel)
- addSubview(infoContentLabel)
-
- infoAvatarImageView.snp.makeConstraints { make in
- make.left.equalTo(16.rpx)
- make.bottom.equalTo(-16.rpx)
- make.size.equalTo(CGSize(width: 56.rpx, height: 56.rpx))
- }
-
- infoNameLabel.snp.makeConstraints { make in
- make.height.equalTo(26.rpx)
- make.left.equalTo(infoAvatarImageView.snp.right).offset(12.rpx)
- make.top.equalTo(infoAvatarImageView.snp.top).offset(7.rpx)
- }
-
- infoContentLabel.snp.makeConstraints { make in
- make.height.equalTo(17.rpx)
- make.left.equalTo(infoAvatarImageView.snp.right).offset(12.rpx)
- make.top.equalTo(infoNameLabel.snp.bottom).offset(2.rpx)
- }
- }
- }
|