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

// 旅行

parent 1a09439b
......@@ -7,6 +7,7 @@
//
import UIKit
import AttributedString
class YHTravelCertificateItemView: UIView {
......@@ -14,9 +15,9 @@ class YHTravelCertificateItemView: UIView {
var clickBlock: (()->())?
var title: String = "" {
var title: ASAttributedString = "" {
didSet {
titleLabel.text = title
titleLabel.attributed.text = title
}
}
......
......@@ -28,6 +28,7 @@ class YHCertificateDateItem {
init(id: YHCertificateID, isMust:Bool, title: String, value: String, placeHolder: String, errorTips: String, isShowErrorTips: Bool = false) {
self.id = id
self.isMust = isMust
self.title = title
self.value = value
self.placeHolder = placeHolder
......@@ -208,7 +209,15 @@ class YHTravelCertificateUploadCell: UITableViewCell {
for (index, item) in arr.enumerated() {
let itemView = YHTravelCertificateItemView(frame: .zero)
itemView.title = item.title
// 标题
var titleStr: ASAttributedString = .init("\(item.title)", .font(UIFont.PFSC_R(ofSize: 14)),.foreground(UIColor.mainTextColor))
// 是否必填
if item.isMust {
let mustTag: ASAttributedString = .init("*", .font(UIFont.PFSC_R(ofSize: 14)),.foreground(UIColor.failColor))
titleStr = mustTag + titleStr
}
itemView.title = titleStr
itemView.placeHolder = item.placeHolder
itemView.isNeedShowErrorTips = item.isShowErrorTips
itemView.errorTips = item.errorTips
......
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