Commit 49b497c6 authored by Steven杜宇's avatar Steven杜宇

// 原则批进度

parent b3a7a9f3
......@@ -7,6 +7,7 @@
//
import UIKit
import AttributedString
class YHPrinciplePhotoListCell: UITableViewCell {
......@@ -68,6 +69,17 @@ class YHPrinciplePhotoListCell: UITableViewCell {
return label
}()
lazy var clickQueryLabel: UILabel = {
let label = UILabel()
label.numberOfLines = 0
let a: ASAttributedString = .init(NSAttributedString(string: "进度更新延迟? "), .font(UIFont.PFSC_R(ofSize: 13)),.foreground(UIColor.mainTextColor))
let b: ASAttributedString = .init(NSAttributedString(string: "点击查询"), .font(UIFont.PFSC_M(ofSize: 13)),.foreground(UIColor.brandMainColor),.underline([.single], color: UIColor.brandMainColor),.action {
})
label.attributed.text = a+b
return label
}()
required init?(coder: NSCoder) {
super.init(coder: coder)
}
......@@ -110,6 +122,8 @@ class YHPrinciplePhotoListCell: UITableViewCell {
whiteView.removeSubviews()
whiteView.addSubview(collectView)
whiteView.addSubview(timeLabel)
whiteView.addSubview(clickQueryLabel)
whiteView.snp.remakeConstraints { make in
make.top.equalTo(titleLabel.snp.bottom).offset(16.0)
make.left.equalTo(20)
......@@ -133,6 +147,16 @@ class YHPrinciplePhotoListCell: UITableViewCell {
make.left.equalTo(16.0)
make.right.equalTo(-16.0)
make.top.equalTo(collectView.snp.bottom).offset(-10.0)
}
let isShowClickQuery = true
clickQueryLabel.snp.remakeConstraints { make in
make.left.equalTo(16.0)
make.right.equalTo(-16.0)
make.top.equalTo(timeLabel.snp.bottom).offset(isShowClickQuery ? 12.0 : 0.0)
if !isShowClickQuery {
make.height.equalTo(0.0)
}
make.bottom.equalTo(-16)
}
......@@ -152,6 +176,7 @@ class YHPrinciplePhotoListCell: UITableViewCell {
contentView.addSubview(whiteView)
whiteView.addSubview(collectView)
whiteView.addSubview(timeLabel)
whiteView.addSubview(clickQueryLabel)
iconImgView.snp.makeConstraints { make in
make.left.equalTo(20)
......@@ -191,6 +216,14 @@ class YHPrinciplePhotoListCell: UITableViewCell {
make.top.equalTo(collectView.snp.bottom)
make.height.equalTo(0.0)
}
clickQueryLabel.snp.makeConstraints { make in
make.left.equalTo(16.0)
make.right.equalTo(-16.0)
make.top.equalTo(timeLabel.snp.bottom)
make.height.equalTo(0.0)
make.bottom.equalTo(-16)
}
}
}
......
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