Commit 16ad5916 authored by David黄金龙's avatar David黄金龙

个人 信息页

parent fbd2978c
......@@ -7,6 +7,7 @@
//
import UIKit
import AttributedString
class YHScorePersonInfoCell: UITableViewCell {
static let cellReuseIdentifier = "YHScorePersonInfoCell"
......@@ -19,12 +20,41 @@ class YHScorePersonInfoCell: UITableViewCell {
//头像
private lazy var headImagV : UIImageView = {
let imageV = UIImageView(image: UIImage(named: "score_header_default"))
imageV.contentMode = .scaleAspectFit
return imageV
}()
//姓名
private lazy var nameLable : UILabel = {
let lable0 = UILabel(text: "DavidHuang")
lable0.textColor = UIColor(hex: 0x222222)
lable0.font = UIFont.PingFangScM(ofSize: 16)
return lable0
}()
//电话号码
private lazy var phoneLable : UILabel = {
let lable0 = UILabel(text: "15818743775")
lable0.textColor = UIColor(hex: 0x888F98)
lable0.font = UIFont.PingFangScR(ofSize: 12)
return lable0
}()
//综合得分
private lazy var scoreLable : UILabel = {
let lable0 = UILabel(text: "92 分")
lable0.textColor = UIColor(hex: 0x3C86F8)
lable0.font = UIFont.PingFangScB(ofSize: 43)
lable0.textAlignment = .right
return lable0
}()
override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
......@@ -119,7 +149,48 @@ extension YHScorePersonInfoCell {
}
holdView.addSubview(nameLable)
nameLable.snp.makeConstraints { make in
make.top.equalTo(headImagV.snp.top)
make.left.equalTo(headImagV.snp.right).offset(12)
make.height.equalTo(24)
make.width.equalTo(200)
}
holdView.addSubview(phoneLable)
phoneLable.snp.makeConstraints { make in
make.top.equalTo(nameLable.snp.bottom)
make.left.equalTo(headImagV.snp.right).offset(12)
make.height.equalTo(20)
make.width.equalTo(200)
}
holdView.addSubview(scoreLable)
scoreLable.snp.makeConstraints { make in
make.top.equalTo(10)
make.right.equalToSuperview().offset(-21)
make.height.equalTo(50)
}
let a: ASAttributedString = .init("95", .font(UIFont.PingFangScR(ofSize: 43)),.foreground(UIColor(hex:0x3C86F8)))
let b: ASAttributedString = .init("分", .font(UIFont.PingFangScR(ofSize: 12)),.foreground(UIColor(hex:0x3C86F8)))
scoreLable.attributed.text = a + b
let lable3 = UILabel(text: "综合得分")
lable3.textColor = UIColor(hex: 0x888F98)
lable3.font = UIFont.PingFangScR(ofSize: 12)
lable3.textAlignment = .right
contentView.addSubview(lable3)
lable3.snp.makeConstraints { make in
make.top.equalTo(scoreLable.snp.bottom).offset(-4)
make.right.equalTo(scoreLable.snp.right)
make.height.equalTo(20)
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment