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

// 原则批进度

parent b3a7a9f3
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
// //
import UIKit import UIKit
import AttributedString
class YHPrinciplePhotoListCell: UITableViewCell { class YHPrinciplePhotoListCell: UITableViewCell {
...@@ -68,6 +69,17 @@ class YHPrinciplePhotoListCell: UITableViewCell { ...@@ -68,6 +69,17 @@ class YHPrinciplePhotoListCell: UITableViewCell {
return label 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) { required init?(coder: NSCoder) {
super.init(coder: coder) super.init(coder: coder)
} }
...@@ -110,6 +122,8 @@ class YHPrinciplePhotoListCell: UITableViewCell { ...@@ -110,6 +122,8 @@ class YHPrinciplePhotoListCell: UITableViewCell {
whiteView.removeSubviews() whiteView.removeSubviews()
whiteView.addSubview(collectView) whiteView.addSubview(collectView)
whiteView.addSubview(timeLabel) whiteView.addSubview(timeLabel)
whiteView.addSubview(clickQueryLabel)
whiteView.snp.remakeConstraints { make in whiteView.snp.remakeConstraints { make in
make.top.equalTo(titleLabel.snp.bottom).offset(16.0) make.top.equalTo(titleLabel.snp.bottom).offset(16.0)
make.left.equalTo(20) make.left.equalTo(20)
...@@ -133,9 +147,19 @@ class YHPrinciplePhotoListCell: UITableViewCell { ...@@ -133,9 +147,19 @@ class YHPrinciplePhotoListCell: UITableViewCell {
make.left.equalTo(16.0) make.left.equalTo(16.0)
make.right.equalTo(-16.0) make.right.equalTo(-16.0)
make.top.equalTo(collectView.snp.bottom).offset(-10.0) make.top.equalTo(collectView.snp.bottom).offset(-10.0)
make.bottom.equalTo(-16)
} }
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)
}
self.setNeedsLayout() self.setNeedsLayout()
self.layoutIfNeeded() self.layoutIfNeeded()
} }
...@@ -152,6 +176,7 @@ class YHPrinciplePhotoListCell: UITableViewCell { ...@@ -152,6 +176,7 @@ class YHPrinciplePhotoListCell: UITableViewCell {
contentView.addSubview(whiteView) contentView.addSubview(whiteView)
whiteView.addSubview(collectView) whiteView.addSubview(collectView)
whiteView.addSubview(timeLabel) whiteView.addSubview(timeLabel)
whiteView.addSubview(clickQueryLabel)
iconImgView.snp.makeConstraints { make in iconImgView.snp.makeConstraints { make in
make.left.equalTo(20) make.left.equalTo(20)
...@@ -191,6 +216,14 @@ class YHPrinciplePhotoListCell: UITableViewCell { ...@@ -191,6 +216,14 @@ class YHPrinciplePhotoListCell: UITableViewCell {
make.top.equalTo(collectView.snp.bottom) make.top.equalTo(collectView.snp.bottom)
make.height.equalTo(0.0) 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