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

// 学历

parent 9c44f9d4
...@@ -160,12 +160,9 @@ extension YHQualificationDetailVC : UITableViewDelegate, UITableViewDataSource { ...@@ -160,12 +160,9 @@ extension YHQualificationDetailVC : UITableViewDelegate, UITableViewDataSource {
let item:YHFormItemProtocol = arr[indexPath.row] let item:YHFormItemProtocol = arr[indexPath.row]
if item is YHFormTitleItem { // 是标题 if item is YHFormTitleItem { // 是标题
let formItem = item as! YHFormTitleItem let formItem = item as! YHFormTitleItem
// 配偶父母子女兄妹title
let cell = tableView.dequeueReusableCell(withIdentifier: YHFormItemTitleCell.cellReuseIdentifier, for: indexPath) as! YHFormItemTitleCell let cell = tableView.dequeueReusableCell(withIdentifier: YHFormItemTitleCell.cellReuseIdentifier, for: indexPath) as! YHFormItemTitleCell
cell.setTitleAndSubTitle(title:formItem.getTitle(), subTitle:formItem.getSubTitle()) cell.setTitleAndSubTitle(title:formItem.getTitle())
return cell return cell
} }
......
...@@ -40,7 +40,7 @@ class YHFormItemDegreeInfoCell: UITableViewCell { ...@@ -40,7 +40,7 @@ class YHFormItemDegreeInfoCell: UITableViewCell {
titleLabel.attributedText = questionAttrStr titleLabel.attributedText = questionAttrStr
} else { } else {
titleLabel.text = "" titleLabel.attributedText = nil
} }
} }
} }
...@@ -167,7 +167,7 @@ class HKDegreeInfoItemView: UIView { ...@@ -167,7 +167,7 @@ class HKDegreeInfoItemView: UIView {
titleLabel.attributedText = questionAttrStr titleLabel.attributedText = questionAttrStr
} else { } else {
titleLabel.text = "" titleLabel.attributedText = nil
} }
} }
} }
......
...@@ -54,7 +54,7 @@ class YHFormItemDoubleChoiceCell: UITableViewCell { ...@@ -54,7 +54,7 @@ class YHFormItemDoubleChoiceCell: UITableViewCell {
titleLabel.attributedText = questionAttrStr titleLabel.attributedText = questionAttrStr
} else { } else {
titleLabel.text = "" titleLabel.attributedText = nil
} }
} }
} }
......
...@@ -48,7 +48,7 @@ class YHFormItemEnterDetailCell: UITableViewCell { ...@@ -48,7 +48,7 @@ class YHFormItemEnterDetailCell: UITableViewCell {
} }
titleLabel.attributedText = questionAttrStr titleLabel.attributedText = questionAttrStr
} else { } else {
titleLabel.text = "" titleLabel.attributedText = nil
} }
} }
} }
......
...@@ -30,7 +30,6 @@ class YHFormItemExpireDateCell: UITableViewCell { ...@@ -30,7 +30,6 @@ class YHFormItemExpireDateCell: UITableViewCell {
var title:String? { var title:String? {
didSet { didSet {
if let title = title, !title.isEmpty { if let title = title, !title.isEmpty {
let str = (isMust ? ("*"+title) : title) let str = (isMust ? ("*"+title) : title)
let attributes: [NSAttributedString.Key: Any] = [ let attributes: [NSAttributedString.Key: Any] = [
...@@ -43,7 +42,7 @@ class YHFormItemExpireDateCell: UITableViewCell { ...@@ -43,7 +42,7 @@ class YHFormItemExpireDateCell: UITableViewCell {
} }
titleLabel.attributedText = questionAttrStr titleLabel.attributedText = questionAttrStr
} else { } else {
titleLabel.text = "" titleLabel.attributedText = nil
} }
} }
} }
...@@ -56,7 +55,6 @@ class YHFormItemExpireDateCell: UITableViewCell { ...@@ -56,7 +55,6 @@ class YHFormItemExpireDateCell: UITableViewCell {
var detail:String? { var detail:String? {
didSet { didSet {
if let detail = detail, !detail.isEmpty { if let detail = detail, !detail.isEmpty {
detailLabel.text = detail detailLabel.text = detail
detailLabel.textColor = detailColor detailLabel.textColor = detailColor
......
...@@ -39,7 +39,7 @@ class YHFormItemInputTextCell: UITableViewCell { ...@@ -39,7 +39,7 @@ class YHFormItemInputTextCell: UITableViewCell {
} }
titleLabel.attributedText = questionAttrStr titleLabel.attributedText = questionAttrStr
} else { } else {
titleLabel.text = "" titleLabel.attributedText = nil
} }
} }
} }
......
...@@ -40,7 +40,7 @@ class YHFormItemQuestionsCell: UITableViewCell { ...@@ -40,7 +40,7 @@ class YHFormItemQuestionsCell: UITableViewCell {
titleLabel.attributedText = questionAttrStr titleLabel.attributedText = questionAttrStr
} else { } else {
titleLabel.text = "" titleLabel.attributedText = nil
} }
} }
} }
......
...@@ -104,7 +104,7 @@ class YHFormItemTitleCell: UITableViewCell { ...@@ -104,7 +104,7 @@ class YHFormItemTitleCell: UITableViewCell {
titleLabel.snp.makeConstraints { make in titleLabel.snp.makeConstraints { make in
make.left.equalToSuperview().offset(16) make.left.equalToSuperview().offset(16)
make.right.equalTo(cancelButton.snp.left).offset(-3) make.right.equalToSuperview().offset(-horizonalGap)
make.top.equalToSuperview().offset(16) make.top.equalToSuperview().offset(16)
make.bottom.equalToSuperview().offset(-16) make.bottom.equalToSuperview().offset(-16)
} }
...@@ -130,6 +130,8 @@ class YHFormItemTitleCell: UITableViewCell { ...@@ -130,6 +130,8 @@ class YHFormItemTitleCell: UITableViewCell {
} }
func showEditType(type: YHFormTitleItemEditType) { func showEditType(type: YHFormTitleItemEditType) {
var titleMaxRight = -(horizonalGap)
switch type { switch type {
case .none: case .none:
cancelButton.isHidden = true cancelButton.isHidden = true
...@@ -137,10 +139,17 @@ class YHFormItemTitleCell: UITableViewCell { ...@@ -137,10 +139,17 @@ class YHFormItemTitleCell: UITableViewCell {
case .canEdit: case .canEdit:
cancelButton.isHidden = true cancelButton.isHidden = true
editButton.isHidden = false editButton.isHidden = false
titleMaxRight = -(horizonalGap+24.0+5.0)
case .canCancel: case .canCancel:
cancelButton.isHidden = false cancelButton.isHidden = false
editButton.isHidden = true editButton.isHidden = true
titleMaxRight = -(horizonalGap+92.0+5.0)
}
titleLabel.snp.updateConstraints { make in
make.right.equalToSuperview().offset(-horizonalGap)
} }
self.setNeedsLayout()
self.layoutIfNeeded()
} }
@objc func didClickOperatorBtn(btn:UIButton) { @objc func didClickOperatorBtn(btn:UIButton) {
......
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