Commit 3b051ab7 authored by Steven杜宇's avatar Steven杜宇

// 家庭信息确认

parent db99e379
...@@ -41,6 +41,9 @@ ...@@ -41,6 +41,9 @@
04213B332C4A084600797900 /* YHHomeInfoClassifyModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04213B322C4A084600797900 /* YHHomeInfoClassifyModel.swift */; }; 04213B332C4A084600797900 /* YHHomeInfoClassifyModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04213B322C4A084600797900 /* YHHomeInfoClassifyModel.swift */; };
04213B352C4F85A900797900 /* YHHomeLifeCategoryModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04213B342C4F85A900797900 /* YHHomeLifeCategoryModel.swift */; }; 04213B352C4F85A900797900 /* YHHomeLifeCategoryModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04213B342C4F85A900797900 /* YHHomeLifeCategoryModel.swift */; };
04213B372C4F87C600797900 /* YHHomeLifeCategoryDetailModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04213B362C4F87C600797900 /* YHHomeLifeCategoryDetailModel.swift */; }; 04213B372C4F87C600797900 /* YHHomeLifeCategoryDetailModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04213B362C4F87C600797900 /* YHHomeLifeCategoryDetailModel.swift */; };
04256DD02C7041C700A37BA4 /* YHInfoItemView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04256DCF2C7041C700A37BA4 /* YHInfoItemView.swift */; };
04256DD22C704A3000A37BA4 /* YHIFamilyInfoListCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04256DD12C704A3000A37BA4 /* YHIFamilyInfoListCell.swift */; };
04256DD42C70538400A37BA4 /* YHFamilyInfoUpdateViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04256DD32C70538400A37BA4 /* YHFamilyInfoUpdateViewController.swift */; };
0425E63D2BA9345200A5E763 /* YHSchemeTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0425E63C2BA9345200A5E763 /* YHSchemeTableViewCell.swift */; }; 0425E63D2BA9345200A5E763 /* YHSchemeTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0425E63C2BA9345200A5E763 /* YHSchemeTableViewCell.swift */; };
0425E6402BA9357D00A5E763 /* YHScemeItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0425E63F2BA9357D00A5E763 /* YHScemeItemModel.swift */; }; 0425E6402BA9357D00A5E763 /* YHScemeItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0425E63F2BA9357D00A5E763 /* YHScemeItemModel.swift */; };
0425E6422BA95B1B00A5E763 /* YHSchemeTableFooterView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0425E6412BA95B1B00A5E763 /* YHSchemeTableFooterView.swift */; }; 0425E6422BA95B1B00A5E763 /* YHSchemeTableFooterView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0425E6412BA95B1B00A5E763 /* YHSchemeTableFooterView.swift */; };
...@@ -699,6 +702,9 @@ ...@@ -699,6 +702,9 @@
04213B322C4A084600797900 /* YHHomeInfoClassifyModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHomeInfoClassifyModel.swift; sourceTree = "<group>"; }; 04213B322C4A084600797900 /* YHHomeInfoClassifyModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHomeInfoClassifyModel.swift; sourceTree = "<group>"; };
04213B342C4F85A900797900 /* YHHomeLifeCategoryModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHomeLifeCategoryModel.swift; sourceTree = "<group>"; }; 04213B342C4F85A900797900 /* YHHomeLifeCategoryModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHomeLifeCategoryModel.swift; sourceTree = "<group>"; };
04213B362C4F87C600797900 /* YHHomeLifeCategoryDetailModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHomeLifeCategoryDetailModel.swift; sourceTree = "<group>"; }; 04213B362C4F87C600797900 /* YHHomeLifeCategoryDetailModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHomeLifeCategoryDetailModel.swift; sourceTree = "<group>"; };
04256DCF2C7041C700A37BA4 /* YHInfoItemView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHInfoItemView.swift; sourceTree = "<group>"; };
04256DD12C704A3000A37BA4 /* YHIFamilyInfoListCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHIFamilyInfoListCell.swift; sourceTree = "<group>"; };
04256DD32C70538400A37BA4 /* YHFamilyInfoUpdateViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHFamilyInfoUpdateViewController.swift; sourceTree = "<group>"; };
0425E63C2BA9345200A5E763 /* YHSchemeTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHSchemeTableViewCell.swift; sourceTree = "<group>"; }; 0425E63C2BA9345200A5E763 /* YHSchemeTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHSchemeTableViewCell.swift; sourceTree = "<group>"; };
0425E63F2BA9357D00A5E763 /* YHScemeItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHScemeItemModel.swift; sourceTree = "<group>"; }; 0425E63F2BA9357D00A5E763 /* YHScemeItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHScemeItemModel.swift; sourceTree = "<group>"; };
0425E6412BA95B1B00A5E763 /* YHSchemeTableFooterView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHSchemeTableFooterView.swift; sourceTree = "<group>"; }; 0425E6412BA95B1B00A5E763 /* YHSchemeTableFooterView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHSchemeTableFooterView.swift; sourceTree = "<group>"; };
...@@ -2247,6 +2253,8 @@ ...@@ -2247,6 +2253,8 @@
049D62C42C6F272800E811A1 /* YHRiskWarningCell.swift */, 049D62C42C6F272800E811A1 /* YHRiskWarningCell.swift */,
049D62C62C6F2F4F00E811A1 /* YHApproverInfoVerifyCell.swift */, 049D62C62C6F2F4F00E811A1 /* YHApproverInfoVerifyCell.swift */,
04506F542C6F57E600738EA1 /* YHFamilyMemberInfoCell.swift */, 04506F542C6F57E600738EA1 /* YHFamilyMemberInfoCell.swift */,
04256DD12C704A3000A37BA4 /* YHIFamilyInfoListCell.swift */,
04256DCF2C7041C700A37BA4 /* YHInfoItemView.swift */,
); );
path = V; path = V;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -2262,6 +2270,7 @@ ...@@ -2262,6 +2270,7 @@
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
049D62C12C6F258700E811A1 /* YHFamilyInfoConfirmViewController.swift */, 049D62C12C6F258700E811A1 /* YHFamilyInfoConfirmViewController.swift */,
04256DD32C70538400A37BA4 /* YHFamilyInfoUpdateViewController.swift */,
); );
path = C; path = C;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -3781,6 +3790,7 @@ ...@@ -3781,6 +3790,7 @@
0419A0A02C48FC7D00A5FCFA /* YHInvitationWithGiftsSecondTableViewCell.swift in Sources */, 0419A0A02C48FC7D00A5FCFA /* YHInvitationWithGiftsSecondTableViewCell.swift in Sources */,
045EEEC72B9F171A0022A143 /* YHOtherYesOrNoItemView.swift in Sources */, 045EEEC72B9F171A0022A143 /* YHOtherYesOrNoItemView.swift in Sources */,
A5FF0F3E2C32F2590069852B /* YHActivityDetailCell2.swift in Sources */, A5FF0F3E2C32F2590069852B /* YHActivityDetailCell2.swift in Sources */,
04256DD42C70538400A37BA4 /* YHFamilyInfoUpdateViewController.swift in Sources */,
04FD85702C21646200BEF9C5 /* YHMyInterestTopicCell.swift in Sources */, 04FD85702C21646200BEF9C5 /* YHMyInterestTopicCell.swift in Sources */,
04A7BD172BA43A0F00BD35A2 /* YHMyDocumentsDetailViewModel.swift in Sources */, 04A7BD172BA43A0F00BD35A2 /* YHMyDocumentsDetailViewModel.swift in Sources */,
045EEEB32B9F171A0022A143 /* YHWorkFileSyncTableViewCell.swift in Sources */, 045EEEB32B9F171A0022A143 /* YHWorkFileSyncTableViewCell.swift in Sources */,
...@@ -3982,6 +3992,7 @@ ...@@ -3982,6 +3992,7 @@
A5FF0F3C2C32F2460069852B /* YHActivityDetailCell1.swift in Sources */, A5FF0F3C2C32F2460069852B /* YHActivityDetailCell1.swift in Sources */,
045EEF232B9F171A0022A143 /* YHItemView.swift in Sources */, 045EEF232B9F171A0022A143 /* YHItemView.swift in Sources */,
04754A952B96FF3D00F8ADCA /* UITextField+Extension.swift in Sources */, 04754A952B96FF3D00F8ADCA /* UITextField+Extension.swift in Sources */,
04256DD02C7041C700A37BA4 /* YHInfoItemView.swift in Sources */,
A5ACE9312B4564F7002C94D2 /* YHPersonalCenterCell.swift in Sources */, A5ACE9312B4564F7002C94D2 /* YHPersonalCenterCell.swift in Sources */,
045EEE9A2B9F171A0022A143 /* YHWorkIntroductionViewModel.swift in Sources */, 045EEE9A2B9F171A0022A143 /* YHWorkIntroductionViewModel.swift in Sources */,
044D0C1C2C22C30B00C5CF5E /* YHEditSchoolViewController.swift in Sources */, 044D0C1C2C22C30B00C5CF5E /* YHEditSchoolViewController.swift in Sources */,
...@@ -4083,6 +4094,7 @@ ...@@ -4083,6 +4094,7 @@
048787D72BCE96F50036E221 /* YHServiceOrderProgressTableViewCell.swift in Sources */, 048787D72BCE96F50036E221 /* YHServiceOrderProgressTableViewCell.swift in Sources */,
047AA3F82C5CC7B0009C4554 /* YHShareStepView.swift in Sources */, 047AA3F82C5CC7B0009C4554 /* YHShareStepView.swift in Sources */,
04AD31792C23FFC700DF5655 /* YHInterestModel.swift in Sources */, 04AD31792C23FFC700DF5655 /* YHInterestModel.swift in Sources */,
04256DD22C704A3000A37BA4 /* YHIFamilyInfoListCell.swift in Sources */,
A596CADF2C6B9B3D00F85797 /* YHHomeAlertViewManager.swift in Sources */, A596CADF2C6B9B3D00F85797 /* YHHomeAlertViewManager.swift in Sources */,
04EA23082BB50753009DA928 /* YHDocumentMessageTableViewCell.swift in Sources */, 04EA23082BB50753009DA928 /* YHDocumentMessageTableViewCell.swift in Sources */,
045EEE8E2B9F171A0022A143 /* YHPreviewInfoWorkSummaryView.swift in Sources */, 045EEE8E2B9F171A0022A143 /* YHPreviewInfoWorkSummaryView.swift in Sources */,
......
...@@ -15,7 +15,7 @@ class YHFamilyInfoConfirmViewController: YHBaseViewController { ...@@ -15,7 +15,7 @@ class YHFamilyInfoConfirmViewController: YHBaseViewController {
lazy var tableView: UITableView = { lazy var tableView: UITableView = {
let tableView = UITableView(frame:.zero, style:.grouped) let tableView = UITableView(frame:.zero, style:.grouped)
tableView.estimatedSectionHeaderHeight = 16.0 tableView.estimatedSectionHeaderHeight = 16.0
tableView.estimatedSectionFooterHeight = 1.0 tableView.estimatedSectionFooterHeight = 0.01
tableView.contentInsetAdjustmentBehavior = .never tableView.contentInsetAdjustmentBehavior = .never
tableView.showsVerticalScrollIndicator = false tableView.showsVerticalScrollIndicator = false
tableView.separatorStyle = .none tableView.separatorStyle = .none
...@@ -52,7 +52,7 @@ extension YHFamilyInfoConfirmViewController: UITableViewDelegate, UITableViewDat ...@@ -52,7 +52,7 @@ extension YHFamilyInfoConfirmViewController: UITableViewDelegate, UITableViewDat
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: YHRiskWarningCell.cellReuseIdentifier, for: indexPath) // let cell = tableView.dequeueReusableCell(withIdentifier: YHRiskWarningCell.cellReuseIdentifier, for: indexPath)
if 0 <= indexPath.section && indexPath.section < items.count { if 0 <= indexPath.section && indexPath.section < items.count {
if indexPath.section == 0 { if indexPath.section == 0 {
...@@ -82,20 +82,18 @@ extension YHFamilyInfoConfirmViewController: UITableViewDelegate, UITableViewDat ...@@ -82,20 +82,18 @@ extension YHFamilyInfoConfirmViewController: UITableViewDelegate, UITableViewDat
} }
private func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> CGFloat { private func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> CGFloat {
return 1.0 return 0.01
} }
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? { func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
let view = UIView() let view = UIView()
view.backgroundColor = .blue
return view return view
} }
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? { func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
let view = UIView() let view = UIView()
view.backgroundColor = .yellow
return view return view
} }
} }
...@@ -88,7 +88,7 @@ class YHApproverInfoVerifyCell: UITableViewCell { ...@@ -88,7 +88,7 @@ class YHApproverInfoVerifyCell: UITableViewCell {
tableView.snp.makeConstraints { make in tableView.snp.makeConstraints { make in
make.top.equalTo(titleLabel.snp.bottom).offset(12) make.top.equalTo(titleLabel.snp.bottom).offset(12)
make.height.equalTo(memberRowHeight * Double(items.count)) make.height.equalTo(memberRowHeight * Double(items.count) + 4.0)
make.left.right.bottom.equalToSuperview() make.left.right.bottom.equalToSuperview()
} }
tableView.reloadData() tableView.reloadData()
...@@ -132,13 +132,11 @@ extension YHApproverInfoVerifyCell: UITableViewDelegate, UITableViewDataSource { ...@@ -132,13 +132,11 @@ extension YHApproverInfoVerifyCell: UITableViewDelegate, UITableViewDataSource {
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? { func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
let view = UIView() let view = UIView()
view.backgroundColor = .red
return view return view
} }
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? { func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
let view = UIView() let view = UIView()
view.backgroundColor = .green
return view return view
} }
} }
...@@ -51,7 +51,7 @@ class YHFamilyMemberInfoCell: UITableViewCell { ...@@ -51,7 +51,7 @@ class YHFamilyMemberInfoCell: UITableViewCell {
}() }()
lazy var arrowImgView: UIImageView = { lazy var arrowImgView: UIImageView = {
let view = UIImageView(image: UIImage(named: "family_info_arrow")) let view = UIImageView(image: UIImage(named: "family_info_status_arrow"))
return view return view
}() }()
......
//
// YHIFamilyInfoListCell.swift
// galaxy
//
// Created by edy on 2024/8/17.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import AttributedString
enum YHFamilyInfoType: Int {
case none = 0
case mainApplicantName = 1
case firstName = 2
case lastName = 3
case marriage = 4
case birthNation = 5
case birthPlace = 6
case declareNation = 7
case occupation = 8
case hongKongId = 9
case travelCertificateType = 10
case travelCertificateId = 11
case childName = 12
case spouseName = 13
}
enum YHFamilyInfoActionType: Int {
case none = 0
case edit = 1 // 输入框编辑
case select = 2 // 弹出弹窗选择
case choice = 3 // 按钮多项选择
}
class YHFamilyInfoItem {
var id: YHFamilyInfoType = .none
var action:YHFamilyInfoActionType = .none
var isMust: Bool = false
var title: String = ""
var detail: String = ""
var previousTitle: String = ""
var previousDetail: String = ""
var isEditMode: Bool = false
var isShowPreviousInfo: Bool = false
init(id: YHFamilyInfoType, action: YHFamilyInfoActionType, isMust: Bool, title: String, detail: String, previousTitle: String, previousDetail: String, isEditMode: Bool, isShowPreviousInfo: Bool) {
self.id = id
self.action = action
self.isMust = isMust
self.title = title
self.detail = detail
self.previousTitle = previousTitle
self.previousDetail = previousDetail
self.isEditMode = isEditMode
self.isShowPreviousInfo = isShowPreviousInfo
}
}
class YHIFamilyInfoListCell: UITableViewCell {
static let cellReuseIdentifier = "YHIFamilyInfoListCell"
lazy var whiteView: UIView = {
let view = UIView()
view.backgroundColor = .white
view.layer.cornerRadius = kCornerRadius6
return view
}()
lazy var titleLabel: UILabel = {
let label = UILabel()
label.numberOfLines = 0
return label
}()
lazy var modifyBtn: UIButton = {
let btn = UIButton()
btn.titleLabel?.font = UIFont.PFSC_R(ofSize: 14)
btn.titleLabel?.textColor = .brandMainColor
btn.setTitle("修改", for: .normal)
return btn
}()
lazy var itemsContentView: UIView = {
let view = UIView()
return view
}()
required init?(coder: NSCoder) {
super.init(coder: coder)
}
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
func setupUI() {
self.selectionStyle = .none
self.backgroundColor = .clear
self.contentView.backgroundColor = .clear
contentView.addSubview(whiteView)
whiteView.addSubview(titleLabel)
whiteView.addSubview(modifyBtn)
whiteView.addSubview(itemsContentView)
whiteView.snp.makeConstraints { make in
make.top.equalTo(16)
make.left.equalTo(16)
make.right.equalTo(-16)
make.bottom.equalTo(-16)
}
titleLabel.snp.makeConstraints { make in
make.top.equalTo(18)
make.left.equalTo(18)
make.right.equalTo(-18)
}
modifyBtn.snp.makeConstraints { make in
make.top.equalTo(18)
make.right.equalTo(-18)
make.size.equalTo(CGSize(width: 28, height: 20))
}
itemsContentView.snp.makeConstraints { make in
make.top.equalTo(titleLabel.snp.bottom).offset(12)
make.left.equalTo(18)
make.right.equalTo(-18)
make.bottom.equalTo(0)
}
}
func updateItems(_ items:[YHFamilyInfoItem]) {
itemsContentView.removeSubviews()
var lastItemView:YHInfoItemView? = nil
for (index, item) in items.enumerated() {
let itemView = YHInfoItemView(frame: .zero)
itemsContentView.addSubview(itemView)
itemView.updateItem(item)
itemView.snp.makeConstraints { make in
make.left.right.equalTo(0)
if let lastView = lastItemView {
make.top.equalTo(lastView.snp.bottom)
} else {
make.top.equalTo(itemsContentView.snp.top)
}
if index == items.count-1 {
make.bottom.equalTo(itemsContentView.snp.bottom)
}
}
lastItemView = itemView
}
self.setNeedsLayout()
self.layoutIfNeeded()
}
}
//
// YHInfoItemView.swift
// galaxy
//
// Created by edy on 2024/8/17.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import AttributedString
class YHInfoItemView: UIView {
var rightBtnWidth = 28.0
lazy var lineView: UIView = {
let view = UIView()
view.backgroundColor = .separatorColor
return view
}()
lazy var titleLabel: UILabel = {
let label = UILabel()
label.font = UIFont.PFSC_R(ofSize: 14)
return label
}()
lazy var detailLabel: UILabel = {
let label = UILabel()
label.numberOfLines = 0
label.font = UIFont.PFSC_M(ofSize: 14)
label.text = "张全蛋"
label.textColor = UIColor.mainTextColor
return label
}()
lazy var rightBtn: UIButton = {
let btn = UIButton()
btn.setImage(UIImage(named: "family_info_del"), for: .normal)
return btn
}()
lazy var previousContentView: UIView = {
let view = UIView()
view.layer.cornerRadius = kCornerRadius6
view.backgroundColor = UIColor(hex: 0xF8F9FB)
view.clipsToBounds = true
return view
}()
lazy var previousTitleLabel: UILabel = {
let label = UILabel()
label.font = UIFont.PFSC_R(ofSize: 12)
label.text = "原主申人姓名"
label.textColor = UIColor.mainTextColor(alpha: 0.3)
return label
}()
lazy var previousDetailLabel: UILabel = {
let label = UILabel()
label.numberOfLines = 0
label.font = UIFont.PFSC_M(ofSize: 12)
label.text = "张全蛋"
label.textColor = UIColor.mainTextColor(alpha: 0.3)
return label
}()
override init(frame: CGRect) {
super.init(frame: frame)
createUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func createUI() {
self.addSubview(lineView)
self.addSubview(titleLabel)
self.addSubview(detailLabel)
self.addSubview(rightBtn)
self.addSubview(previousContentView)
previousContentView.addSubview(previousTitleLabel)
previousContentView.addSubview(previousDetailLabel)
lineView.snp.makeConstraints { make in
make.left.right.top.equalToSuperview()
make.height.equalTo(0.5)
}
titleLabel.snp.makeConstraints { make in
make.top.equalTo(16)
make.left.equalTo(0)
make.height.equalTo(20)
make.width.equalTo(122)
}
detailLabel.snp.makeConstraints { make in
make.top.equalTo(16)
make.left.equalTo(titleLabel.snp.right)
make.right.equalTo(-18.0-rightBtnWidth-18.0)
}
rightBtn.snp.makeConstraints { make in
make.top.equalTo(16)
make.width.height.equalTo(22)
make.right.equalTo(0)
}
previousContentView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.bottom.equalTo(-16)
make.top.equalTo(detailLabel.snp.bottom).offset(16)
}
previousTitleLabel.snp.makeConstraints { make in
make.left.equalTo(12)
make.top.equalTo(12)
make.width.equalTo(110)
}
previousDetailLabel.snp.makeConstraints { make in
make.left.equalTo(previousTitleLabel.snp.right).offset(0)
make.top.equalTo(12)
make.right.equalTo(-18)
make.bottom.equalTo(-12)
}
}
func updateItem(_ item: YHFamilyInfoItem) {
// 标题
var title: 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))
title = mustTag + title
}
titleLabel.attributed.text = title
detailLabel.text = item.detail
rightBtn.isHidden = !item.isEditMode
previousTitleLabel.text = item.previousTitle
previousDetailLabel.text = item.previousDetail
previousContentView.isHidden = !item.isShowPreviousInfo
detailLabel.snp.updateConstraints { make in
make.right.equalTo(item.isEditMode ? -18.0-rightBtnWidth-18.0 : 0)
}
previousContentView.snp.remakeConstraints { make in
make.left.right.equalToSuperview()
make.bottom.equalTo(item.isShowPreviousInfo ? -16 : 0)
if !item.isShowPreviousInfo {
make.height.equalTo(0)
}
make.top.equalTo(detailLabel.snp.bottom).offset(16)
}
}
}
...@@ -338,7 +338,7 @@ extension YHMyViewController : UITableViewDelegate, UITableViewDataSource { ...@@ -338,7 +338,7 @@ extension YHMyViewController : UITableViewDelegate, UITableViewDataSource {
} }
if true { if true {
let vc = YHFamilyInfoConfirmViewController() let vc = YHFamilyInfoUpdateViewController()
self.navigationController?.pushViewController(vc) self.navigationController?.pushViewController(vc)
return return
} }
......
...@@ -5,12 +5,12 @@ ...@@ -5,12 +5,12 @@
"scale" : "1x" "scale" : "1x"
}, },
{ {
"filename" : "箭头中@2x.png", "filename" : "Group 2848@2x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"filename" : "箭头中@3x.png", "filename" : "Group 2848@3x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "3x" "scale" : "3x"
} }
......
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Group 2848@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Group 2848@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "箭头中@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "箭头中@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
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