Commit a155e964 authored by Steven杜宇's avatar Steven杜宇

// 我的证件

parent 156e63ee
......@@ -20,7 +20,8 @@ class YHCertificateInfoCell: UITableViewCell {
var whiteView: UIView!
var nameTextView: UITextView!
var infoLabel: UILabel!
var statusBtn: UIButton!
var statusLabel: UILabel!
var rightArrowImgV: UIImageView!
private lazy var templateLabel : UILabel = {
let label = UILabel(frame: CGRect(x: 0, y: 0, width: 48, height: 16))
......@@ -36,7 +37,6 @@ class YHCertificateInfoCell: UITableViewCell {
label.addGestureRecognizer(tap)
return label
}()
required init?(coder: NSCoder) {
super.init(coder: coder)
......@@ -69,8 +69,8 @@ class YHCertificateInfoCell: UITableViewCell {
case .all:
titleColor = .labelTextColor2
}
statusBtn.setTitleColor(titleColor, for:.normal)
statusBtn.setTitle(title, for: .normal)
statusLabel.text = title
statusLabel.textColor = titleColor
}
if model.templateInfo.materialPath.isEmpty && model.templateInfo.guideFilePath.isEmpty && model.templateInfo.description.isEmpty {
......@@ -113,26 +113,24 @@ class YHCertificateInfoCell: UITableViewCell {
whiteView.addSubview(nameTextView)
nameTextView.attributed.text = """
\("我是资料名称", .foreground(UIColor.mainTextColor), .font(UIFont.PFSC_M(ofSize: 16))) \(.view(templateLabel, .original(.center)))
\("资料名称", .foreground(UIColor.mainTextColor), .font(UIFont.PFSC_M(ofSize: 16))) \(.view(templateLabel, .original(.center)))
"""
infoLabel = UILabel()
infoLabel.textColor = UIColor.labelTextColor2
infoLabel.textAlignment = .left
infoLabel.font = UIFont.PFSC_R(ofSize:11)
infoLabel.text = "类型:证件资料 所属人:张康"
infoLabel.numberOfLines = 0
whiteView.addSubview(infoLabel)
statusBtn = UIButton()
statusBtn.titleLabel?.font = UIFont.PFSC_R(ofSize:14)
statusLabel = UILabel()
statusLabel.textColor = UIColor.labelTextColor2
statusLabel.textAlignment = .left
statusLabel.font = UIFont.PFSC_R(ofSize:14)
whiteView.addSubview(statusLabel)
let iconWidth = 16.0
let titleWidth = 42.0
statusBtn.titleEdgeInsets = UIEdgeInsets(top: 0, left: -iconWidth, bottom: 0, right: iconWidth)
statusBtn.imageEdgeInsets = UIEdgeInsets(top: 0, left: titleWidth, bottom: 0, right: -titleWidth)
statusBtn.setImage(UIImage(named:"my_cer_arrow_right"), for:.normal)
statusBtn.setTitleColor(.labelTextColor2, for:.normal)
whiteView.addSubview(statusBtn)
rightArrowImgV = UIImageView(image: UIImage(named: "service_center_right_next_icon"))
whiteView.addSubview(rightArrowImgV)
whiteView.snp.makeConstraints { make in
make.left.equalToSuperview().offset(20)
......@@ -143,7 +141,7 @@ class YHCertificateInfoCell: UITableViewCell {
nameTextView.snp.makeConstraints { make in
make.left.equalToSuperview().offset(10)
make.top.equalToSuperview().offset(4)
make.right.equalTo(statusBtn.snp.left)
make.right.equalTo(statusLabel.snp.left).offset(-6)
}
infoLabel.snp.makeConstraints { make in
......@@ -154,11 +152,16 @@ class YHCertificateInfoCell: UITableViewCell {
make.height.equalTo(20)
}
statusBtn.snp.makeConstraints { make in
make.height.equalTo(60)
make.width.equalTo(92)
statusLabel.snp.makeConstraints { make in
make.right.equalTo(rightArrowImgV.snp.left).offset(-6)
make.size.equalTo(CGSize(width: 42, height: 20))
make.centerY.equalToSuperview()
}
rightArrowImgV.snp.makeConstraints { make in
make.right.equalToSuperview().offset(-16)
make.size.equalTo(CGSize(width: 16, height: 16))
make.centerY.equalToSuperview()
make.right.equalToSuperview()
}
}
......
{
"images" : [
{
"filename" : "icon-展开.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
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