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

// 学历

parent fdbde0b0
......@@ -209,7 +209,7 @@ extension YHEducationInfoListVC : UITableViewDelegate, UITableViewDataSource {
// 决定右边按钮显示样式
cell.showEditType(type: .none)
if formItem.type == .mainApplicantEducation { // 学历
cell.setTitleAndSubTitle(title:formItem.getTitle(), subTitle:formItem.getSubTitle(), isNeedWrap:isNeedWrap)
cell.setTitleAndSubTitle(isNeedMust: true, title:formItem.getTitle(), subTitle:formItem.getSubTitle(), isNeedWrap:isNeedWrap)
cell.showEditType(type: isDegreeEditMode)
} else if formItem.type == .mainApplicantProfessionalQualification { // 专业
......
......@@ -19,7 +19,7 @@ class YHFormItemTitleCell: UITableViewCell {
var rightClickBlock:((YHFormTitleItemEditType)->Void)?
// isNeedWrap 副标题是否需要换行
func setTitleAndSubTitle(title: String? = "", subTitle: String? = "", subTitleColor: UIColor = .labelTextColor2, isNeedWrap:Bool = false) {
func setTitleAndSubTitle(isNeedMust: Bool = false, title: String? = "", subTitle: String? = "", subTitleColor: UIColor = .labelTextColor2, isNeedWrap:Bool = false) {
let titleAttributes: [NSAttributedString.Key: Any] = [
.font: UIFont.PFSC_M(ofSize: 17),
......@@ -30,7 +30,8 @@ class YHFormItemTitleCell: UITableViewCell {
.foregroundColor: subTitleColor
]
let attrStr = NSMutableAttributedString(string:"", attributes: titleAttributes)
let text = isNeedMust ? "*" : ""
let attrStr = NSMutableAttributedString(string:text, attributes: titleAttributes)
if let title = title, !title.isEmpty {
let titleAttrStr = NSMutableAttributedString(string:title, attributes:titleAttributes)
......
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