Commit 51a779ea authored by pete谢兆麟's avatar pete谢兆麟

Merge branch 'develop' of http://gitlab.galaxy-immi.com/mobile-group/galaxy-iOS into develop

# Conflicts:
#	galaxy/galaxy.xcodeproj/project.pbxproj
parents 42b165cc 20c4b3d7
...@@ -44,6 +44,13 @@ ...@@ -44,6 +44,13 @@
04256DD02C7041C700A37BA4 /* YHInfoItemView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04256DCF2C7041C700A37BA4 /* YHInfoItemView.swift */; }; 04256DD02C7041C700A37BA4 /* YHInfoItemView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04256DCF2C7041C700A37BA4 /* YHInfoItemView.swift */; };
04256DD22C704A3000A37BA4 /* YHIFamilyInfoListCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04256DD12C704A3000A37BA4 /* YHIFamilyInfoListCell.swift */; }; 04256DD22C704A3000A37BA4 /* YHIFamilyInfoListCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04256DD12C704A3000A37BA4 /* YHIFamilyInfoListCell.swift */; };
04256DD42C70538400A37BA4 /* YHFamilyInfoUpdateViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04256DD32C70538400A37BA4 /* YHFamilyInfoUpdateViewController.swift */; }; 04256DD42C70538400A37BA4 /* YHFamilyInfoUpdateViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04256DD32C70538400A37BA4 /* YHFamilyInfoUpdateViewController.swift */; };
04256DDE2C72DA3B00A37BA4 /* YHCertificateAppointViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04256DDD2C72DA3A00A37BA4 /* YHCertificateAppointViewController.swift */; };
04256DE02C72DC0600A37BA4 /* YHCertificateAppointOptionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04256DDF2C72DC0600A37BA4 /* YHCertificateAppointOptionView.swift */; };
04256DE22C72E1EA00A37BA4 /* YHCertificateAppointOptionCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04256DE12C72E1EA00A37BA4 /* YHCertificateAppointOptionCell.swift */; };
04256DE42C72E3FA00A37BA4 /* YHInfoItemOptionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04256DE32C72E3FA00A37BA4 /* YHInfoItemOptionView.swift */; };
04256DE62C7310BE00A37BA4 /* YHSelectApplicantGroupCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04256DE52C7310BE00A37BA4 /* YHSelectApplicantGroupCell.swift */; };
04256DE82C7314B500A37BA4 /* YHSelectApplicantCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04256DE72C7314B500A37BA4 /* YHSelectApplicantCell.swift */; };
04256DEA2C73263A00A37BA4 /* YHInfoItemSelectSheetView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04256DE92C73263A00A37BA4 /* YHInfoItemSelectSheetView.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 */; };
...@@ -711,6 +718,13 @@ ...@@ -711,6 +718,13 @@
04256DCF2C7041C700A37BA4 /* YHInfoItemView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHInfoItemView.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>"; }; 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>"; }; 04256DD32C70538400A37BA4 /* YHFamilyInfoUpdateViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHFamilyInfoUpdateViewController.swift; sourceTree = "<group>"; };
04256DDD2C72DA3A00A37BA4 /* YHCertificateAppointViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateAppointViewController.swift; sourceTree = "<group>"; };
04256DDF2C72DC0600A37BA4 /* YHCertificateAppointOptionView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateAppointOptionView.swift; sourceTree = "<group>"; };
04256DE12C72E1EA00A37BA4 /* YHCertificateAppointOptionCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateAppointOptionCell.swift; sourceTree = "<group>"; };
04256DE32C72E3FA00A37BA4 /* YHInfoItemOptionView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHInfoItemOptionView.swift; sourceTree = "<group>"; };
04256DE52C7310BE00A37BA4 /* YHSelectApplicantGroupCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHSelectApplicantGroupCell.swift; sourceTree = "<group>"; };
04256DE72C7314B500A37BA4 /* YHSelectApplicantCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHSelectApplicantCell.swift; sourceTree = "<group>"; };
04256DE92C73263A00A37BA4 /* YHInfoItemSelectSheetView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHInfoItemSelectSheetView.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>"; };
...@@ -1460,6 +1474,52 @@ ...@@ -1460,6 +1474,52 @@
path = V; path = V;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
04256DD72C72D9C200A37BA4 /* AppointCertificate(赴港办证预约) */ = {
isa = PBXGroup;
children = (
04256DDB2C72DA0400A37BA4 /* C */,
04256DDA2C72D9FF00A37BA4 /* V */,
04256DD92C72D9F800A37BA4 /* M */,
04256DD82C72D9F000A37BA4 /* VM */,
);
path = "AppointCertificate(赴港办证预约)";
sourceTree = "<group>";
};
04256DD82C72D9F000A37BA4 /* VM */ = {
isa = PBXGroup;
children = (
);
path = VM;
sourceTree = "<group>";
};
04256DD92C72D9F800A37BA4 /* M */ = {
isa = PBXGroup;
children = (
);
path = M;
sourceTree = "<group>";
};
04256DDA2C72D9FF00A37BA4 /* V */ = {
isa = PBXGroup;
children = (
04256DDF2C72DC0600A37BA4 /* YHCertificateAppointOptionView.swift */,
04256DE12C72E1EA00A37BA4 /* YHCertificateAppointOptionCell.swift */,
04256DE52C7310BE00A37BA4 /* YHSelectApplicantGroupCell.swift */,
04256DE72C7314B500A37BA4 /* YHSelectApplicantCell.swift */,
04256DE32C72E3FA00A37BA4 /* YHInfoItemOptionView.swift */,
04256DE92C73263A00A37BA4 /* YHInfoItemSelectSheetView.swift */,
);
path = V;
sourceTree = "<group>";
};
04256DDB2C72DA0400A37BA4 /* C */ = {
isa = PBXGroup;
children = (
04256DDD2C72DA3A00A37BA4 /* YHCertificateAppointViewController.swift */,
);
path = C;
sourceTree = "<group>";
};
0425E63B2BA931B300A5E763 /* View */ = { 0425E63B2BA931B300A5E763 /* View */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
...@@ -2291,6 +2351,7 @@ ...@@ -2291,6 +2351,7 @@
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
0430E63C2C72DB48000511E2 /* AddAdopters */, 0430E63C2C72DB48000511E2 /* AddAdopters */,
04256DD72C72D9C200A37BA4 /* AppointCertificate(赴港办证预约) */,
049D62C32C6F259D00E811A1 /* FamilyInfoConfirm(家庭信息确认) */, 049D62C32C6F259D00E811A1 /* FamilyInfoConfirm(家庭信息确认) */,
); );
path = "Certificate(办证段)"; path = "Certificate(办证段)";
...@@ -3784,6 +3845,7 @@ ...@@ -3784,6 +3845,7 @@
A5D001212BAA9D99001F003C /* YHChoiceButtonHoldView.swift in Sources */, A5D001212BAA9D99001F003C /* YHChoiceButtonHoldView.swift in Sources */,
045EEEF62B9F171A0022A143 /* YHSpousePrimaryInfoVC.swift in Sources */, 045EEEF62B9F171A0022A143 /* YHSpousePrimaryInfoVC.swift in Sources */,
044867B82BA1C75700DFAD4A /* YHCertificateUploadFailTipsView.swift in Sources */, 044867B82BA1C75700DFAD4A /* YHCertificateUploadFailTipsView.swift in Sources */,
04256DE02C72DC0600A37BA4 /* YHCertificateAppointOptionView.swift in Sources */,
044D0C062C22736F00C5CF5E /* YHSetExplainView.swift in Sources */, 044D0C062C22736F00C5CF5E /* YHSetExplainView.swift in Sources */,
04213B252C48C15400797900 /* YHHomeIdentityViewController.swift in Sources */, 04213B252C48C15400797900 /* YHHomeIdentityViewController.swift in Sources */,
0472E25C2C521E64008EAB6E /* YHHomeIdentityListVC.swift in Sources */, 0472E25C2C521E64008EAB6E /* YHHomeIdentityListVC.swift in Sources */,
...@@ -3906,6 +3968,7 @@ ...@@ -3906,6 +3968,7 @@
047AA3DD2C4A6126009C4554 /* YHLifeViewController.swift in Sources */, 047AA3DD2C4A6126009C4554 /* YHLifeViewController.swift in Sources */,
04FD856C2C2153F000BEF9C5 /* YHMyEducationCell.swift in Sources */, 04FD856C2C2153F000BEF9C5 /* YHMyEducationCell.swift in Sources */,
A5DE0D3C2BB9016200976FE1 /* YHEmailInputAlertView.swift in Sources */, A5DE0D3C2BB9016200976FE1 /* YHEmailInputAlertView.swift in Sources */,
04256DE42C72E3FA00A37BA4 /* YHInfoItemOptionView.swift in Sources */,
A5ACE9512B4564F7002C94D2 /* YhConstant.swift in Sources */, A5ACE9512B4564F7002C94D2 /* YhConstant.swift in Sources */,
04FD85662C2124AF00BEF9C5 /* YHNameCardViewController.swift in Sources */, 04FD85662C2124AF00BEF9C5 /* YHNameCardViewController.swift in Sources */,
0430E63B2C6DA106000511E2 /* CGFloat+Extention.swift in Sources */, 0430E63B2C6DA106000511E2 /* CGFloat+Extention.swift in Sources */,
...@@ -3994,6 +4057,7 @@ ...@@ -3994,6 +4057,7 @@
0408C3632BEC7C6900DB1E25 /* YHVideoPlayerControlView.swift in Sources */, 0408C3632BEC7C6900DB1E25 /* YHVideoPlayerControlView.swift in Sources */,
A567E5B12BD7643D00D5D5A0 /* YHHomeCollectionViewCell.swift in Sources */, A567E5B12BD7643D00D5D5A0 /* YHHomeCollectionViewCell.swift in Sources */,
A582B2432BB95E20009D098C /* YHHKPlanCell.swift in Sources */, A582B2432BB95E20009D098C /* YHHKPlanCell.swift in Sources */,
04256DE62C7310BE00A37BA4 /* YHSelectApplicantGroupCell.swift in Sources */,
04CE1AE22C2AD91F001CB80A /* YHActivityApplyInfoItemView.swift in Sources */, 04CE1AE22C2AD91F001CB80A /* YHActivityApplyInfoItemView.swift in Sources */,
045EEEC52B9F171A0022A143 /* YHOtherPickerView.swift in Sources */, 045EEEC52B9F171A0022A143 /* YHOtherPickerView.swift in Sources */,
045EEE842B9F171A0022A143 /* YHPreviewBasiceInformationViewController.swift in Sources */, 045EEE842B9F171A0022A143 /* YHPreviewBasiceInformationViewController.swift in Sources */,
...@@ -4056,6 +4120,7 @@ ...@@ -4056,6 +4120,7 @@
045EEE9A2B9F171A0022A143 /* YHWorkIntroductionViewModel.swift in Sources */, 045EEE9A2B9F171A0022A143 /* YHWorkIntroductionViewModel.swift in Sources */,
044D0C1C2C22C30B00C5CF5E /* YHEditSchoolViewController.swift in Sources */, 044D0C1C2C22C30B00C5CF5E /* YHEditSchoolViewController.swift in Sources */,
A5ACE9532B4564F7002C94D2 /* YHBaseViewController.swift in Sources */, A5ACE9532B4564F7002C94D2 /* YHBaseViewController.swift in Sources */,
04256DE82C7314B500A37BA4 /* YHSelectApplicantCell.swift in Sources */,
045EEE9D2B9F171A0022A143 /* YHWorkItemListViewModel.swift in Sources */, 045EEE9D2B9F171A0022A143 /* YHWorkItemListViewModel.swift in Sources */,
A5ACE9392B4564F7002C94D2 /* UIDevice+Extension.swift in Sources */, A5ACE9392B4564F7002C94D2 /* UIDevice+Extension.swift in Sources */,
04CE1AD02C2AD91F001CB80A /* YHActivityListModel.swift in Sources */, 04CE1AD02C2AD91F001CB80A /* YHActivityListModel.swift in Sources */,
...@@ -4262,6 +4327,7 @@ ...@@ -4262,6 +4327,7 @@
04A7BD152BA4361700BD35A2 /* YHMyDocumentDetailModel.swift in Sources */, 04A7BD152BA4361700BD35A2 /* YHMyDocumentDetailModel.swift in Sources */,
045EEEA02B9F171A0022A143 /* YHWorkItemListModel.swift in Sources */, 045EEEA02B9F171A0022A143 /* YHWorkItemListModel.swift in Sources */,
04EA230E2BB538E9009DA928 /* YHDocumentUploadTableViewCell.swift in Sources */, 04EA230E2BB538E9009DA928 /* YHDocumentUploadTableViewCell.swift in Sources */,
04256DEA2C73263A00A37BA4 /* YHInfoItemSelectSheetView.swift in Sources */,
04174D742BCD5B74000BA46D /* IMAppKey.swift in Sources */, 04174D742BCD5B74000BA46D /* IMAppKey.swift in Sources */,
A567E5B62BD7643D00D5D5A0 /* YHHomeBannerIndicatorView.swift in Sources */, A567E5B62BD7643D00D5D5A0 /* YHHomeBannerIndicatorView.swift in Sources */,
045EEEAD2B9F171A0022A143 /* YHWorkExperienceListTableViewCell.swift in Sources */, 045EEEAD2B9F171A0022A143 /* YHWorkExperienceListTableViewCell.swift in Sources */,
...@@ -4309,12 +4375,14 @@ ...@@ -4309,12 +4375,14 @@
A5ACE9562B4564F7002C94D2 /* YHBouncesContentView.swift in Sources */, A5ACE9562B4564F7002C94D2 /* YHBouncesContentView.swift in Sources */,
A554A5122B99715000EA5973 /* YHConstantArrayData.swift in Sources */, A554A5122B99715000EA5973 /* YHConstantArrayData.swift in Sources */,
045EEE962B9F171A0022A143 /* YHPreviewInfoCertificatePictureItemsView.swift in Sources */, 045EEE962B9F171A0022A143 /* YHPreviewInfoCertificatePictureItemsView.swift in Sources */,
04256DDE2C72DA3B00A37BA4 /* YHCertificateAppointViewController.swift in Sources */,
A592FE912BA6CC010062FACA /* YHCertificateEntryHeadView.swift in Sources */, A592FE912BA6CC010062FACA /* YHCertificateEntryHeadView.swift in Sources */,
0425E63D2BA9345200A5E763 /* YHSchemeTableViewCell.swift in Sources */, 0425E63D2BA9345200A5E763 /* YHSchemeTableViewCell.swift in Sources */,
047AA3FC2C61EE7F009C4554 /* YHSignAppendStepView.swift in Sources */, 047AA3FC2C61EE7F009C4554 /* YHSignAppendStepView.swift in Sources */,
044D0C1E2C22CFBF00C5CF5E /* YHEditWorkViewController.swift in Sources */, 044D0C1E2C22CFBF00C5CF5E /* YHEditWorkViewController.swift in Sources */,
A5ACE9302B4564F7002C94D2 /* Algorithm.swift in Sources */, A5ACE9302B4564F7002C94D2 /* Algorithm.swift in Sources */,
045EEED52B9F171A0022A143 /* YHEducationRequestViewModel.swift in Sources */, 045EEED52B9F171A0022A143 /* YHEducationRequestViewModel.swift in Sources */,
04256DE22C72E1EA00A37BA4 /* YHCertificateAppointOptionCell.swift in Sources */,
045EEEB62B9F171A0022A143 /* YHWorkExperienceItemView.swift in Sources */, 045EEEB62B9F171A0022A143 /* YHWorkExperienceItemView.swift in Sources */,
047AA3E42C4A6ADC009C4554 /* YHLifeHeadView.swift in Sources */, 047AA3E42C4A6ADC009C4554 /* YHLifeHeadView.swift in Sources */,
A58A8C942BA6C7C600632765 /* YHCertificateEntryModel.swift in Sources */, A58A8C942BA6C7C600632765 /* YHCertificateEntryModel.swift in Sources */,
......
//
// YHCertificateAppointViewController.swift
// galaxy
//
// Created by edy on 2024/8/19.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHCertificateAppointViewController: YHBaseViewController {
var items = ["", ""]
lazy var tableView: UITableView = {
let tableView = UITableView(frame:.zero, style:.grouped)
tableView.estimatedSectionHeaderHeight = 16.0
tableView.estimatedSectionFooterHeight = 0.01
tableView.contentInsetAdjustmentBehavior = .never
tableView.showsVerticalScrollIndicator = false
tableView.separatorStyle = .none
tableView.delegate = self
tableView.dataSource = self
tableView.backgroundColor = UIColor(hex: 0xF8F9FB)
tableView.register(UITableViewCell.self, forCellReuseIdentifier: "UITableViewCell")
tableView.register(YHCertificateAppointOptionCell.self, forCellReuseIdentifier: YHCertificateAppointOptionCell.cellReuseIdentifier)
tableView.register(YHSelectApplicantGroupCell.self, forCellReuseIdentifier: YHSelectApplicantGroupCell.cellReuseIdentifier)
return tableView
}()
override func viewDidLoad() {
super.viewDidLoad()
createUI()
}
func createUI() {
super.viewDidLoad()
self.gk_navTitle = "赴港办证预约"
self.view.backgroundColor = .white
self.view.addSubview(self.tableView)
self.tableView.snp.makeConstraints { make in
make.left.right.bottom.equalToSuperview()
make.top.equalTo(k_Height_NavigationtBarAndStatuBar)
}
}
}
extension YHCertificateAppointViewController: UITableViewDelegate, UITableViewDataSource {
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return items.count
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
if indexPath.row == 0 {
let cell = tableView.dequeueReusableCell(withIdentifier: YHCertificateAppointOptionCell.cellReuseIdentifier, for: indexPath) as! YHCertificateAppointOptionCell
return cell
}
let cell = tableView.dequeueReusableCell(withIdentifier: YHSelectApplicantGroupCell.cellReuseIdentifier, for: indexPath) as! YHSelectApplicantGroupCell
return cell
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return UITableView.automaticDimension
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
if 0 <= indexPath.section && indexPath.section < items.count {
}
}
private func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> CGFloat {
return 0.01
}
private func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> CGFloat {
return 0.01
}
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
let view = UIView()
return view
}
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
let view = UIView()
return view
}
}
//
// YHCertificateAppointOptionCell.swift
// galaxy
//
// Created by edy on 2024/8/19.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import AttributedString
class YHCertificateAppointOptionCell: UITableViewCell {
static let cellReuseIdentifier = "YHCertificateAppointOptionCell"
lazy var whiteContentView: UIView = {
let view = UIView()
view.backgroundColor = .white
view.layer.cornerRadius = kCornerRadius6
return view
}()
lazy var lineView: UIView = {
let view = UIView()
view.backgroundColor = .separatorColor
return view
}()
lazy var titleLabel: UILabel = {
let label = UILabel()
label.numberOfLines = 0
let a: ASAttributedString = .init("*", .font(UIFont.PFSC_M(ofSize: 17)),.foreground(UIColor.failColor))
let b: ASAttributedString = .init("赴港办证", .font(UIFont.PFSC_M(ofSize: 17)),.foreground(UIColor.mainTextColor))
label.attributed.text = a+b
return label
}()
lazy var detailLabel: UILabel = {
let label = UILabel()
label.numberOfLines = 0
let a: ASAttributedString = .init("备注:如您已获得香港居民身份证,此时无需再赴港办理身份证,", .font(UIFont.PFSC_R(ofSize: 13)),.foreground(UIColor.init(hex: 0x94A3B8)))
let b: ASAttributedString = .init("则选择“否”", .font(UIFont.PFSC_R(ofSize: 13)),.foreground(UIColor.brandMainColor))
label.attributed.text = a+b
return label
}()
lazy var optionsView: YHInfoItemOptionView = {
let view = YHInfoItemOptionView(frame: .zero)
view.title = "是否赴港办证"
view.setOptions(["是", "否"])
view.selectIndex = 0
view.selectBlock = {
index in
}
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(whiteContentView)
whiteContentView.addSubview(titleLabel)
whiteContentView.addSubview(lineView)
whiteContentView.addSubview(detailLabel)
whiteContentView.addSubview(optionsView)
whiteContentView.snp.makeConstraints { make in
make.top.equalTo(16)
make.left.equalTo(16)
make.right.equalTo(-16)
make.bottom.equalTo(0)
}
titleLabel.snp.makeConstraints { make in
make.top.equalTo(16)
make.left.equalTo(18)
make.right.equalTo(-18)
}
lineView.snp.makeConstraints { make in
make.top.equalTo(titleLabel.snp.bottom).offset(12)
make.left.right.equalToSuperview()
make.height.equalTo(0.5)
}
detailLabel.snp.makeConstraints { make in
make.top.equalTo(lineView.snp.bottom).offset(16)
make.left.equalTo(18)
make.right.equalTo(-18)
}
optionsView.snp.makeConstraints { make in
make.top.equalTo(detailLabel.snp.bottom).offset(10)
make.left.equalTo(18)
make.right.equalTo(0)
make.bottom.equalTo(-8)
}
}
}
//
// YHCertificateAppointOptionView.swift
// galaxy
//
// Created by edy on 2024/8/19.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHCertificateAppointOptionView: UIView {
lazy var whiteContentView: UIView = {
let view = UIView()
view.backgroundColor = .white
view.layer.cornerRadius = kCornerRadius6
return view
}()
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
}()
}
//
// YHInfoItemOptionView.swift
// galaxy
//
// Created by edy on 2024/8/19.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHInfoItemOption {
var value: String = ""
var isSelect: Bool = false
}
class YHInfoItemOptionView: UIView {
let btnHeight = 32.0
let titleMaxWidth = 113.0
let baseBtnTag = 9527
var options: [String] = []
var selectBlock:((Int)->())?
var title: String = "" {
didSet {
self.titleLabel.text = title
let height = self.getHeight(text: title, font: titleLabel.font , width: titleMaxWidth)
var isOneLine = false
if height <= 20 {
// 文字只显示一行
isOneLine = true
} else {
// 文字超过一行
isOneLine = false
}
titleLabel.snp.remakeConstraints { make in
if isOneLine {
make.height.equalTo(20)
}
make.edges.equalToSuperview()
}
self.setNeedsLayout()
self.layoutIfNeeded()
}
}
func setOptions(_ options:[String]) {
self.options = options
for (index, text) in options.enumerated() {
if let btn = self.viewWithTag(baseBtnTag + index) as? UIButton {
btn.setTitle(text, for: .normal)
}
}
}
var selectIndex: Int = -1 {
didSet {
for (index, _) in options.enumerated() {
if let btn = self.viewWithTag(baseBtnTag + index) as? UIButton {
setOptionBtnSelected(btn: btn, isSelect: index == selectIndex)
}
}
}
}
var titleGap = 16.0 {
didSet {
titleView.snp.updateConstraints { make in
make.top.equalTo(titleGap)
make.bottom.equalTo(-titleGap)
}
self.setNeedsLayout()
self.layoutIfNeeded()
}
}
lazy var lineView: UIView = {
let view = UIView()
view.backgroundColor = .separatorColor
return view
}()
lazy var titleView: UIView = {
let view = UIView()
return view
}()
lazy var titleLabel: UILabel = {
let label = UILabel()
label.numberOfLines = 0
label.font = UIFont.PFSC_R(ofSize: 14)
return label
}()
func createOptionButton() -> UIButton {
let btn = UIButton()
btn.backgroundColor = UIColor.init(hex: 0xF8F9FB)
btn.titleLabel?.font = .PFSC_R(ofSize: 13)
btn.setTitle("", for: .normal)
btn.layer.cornerRadius = self.btnHeight/2.0
btn.clipsToBounds = true
return btn
}
func setOptionBtnSelected(btn: UIButton, isSelect: Bool) {
btn.layer.borderWidth = isSelect ? 1.0 : 0.0
btn.layer.borderColor = isSelect ? UIColor.brandMainColor.cgColor : nil
btn.setTitleColor(isSelect ? UIColor.brandMainColor : UIColor.init(hex: 0x222222), for: .normal)
}
override init(frame: CGRect) {
super.init(frame: frame)
createUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func createUI() {
self.addSubview(titleView)
titleView.addSubview(titleLabel)
let firstBtn = self.createOptionButton()
firstBtn.tag = baseBtnTag + 0
setOptionBtnSelected(btn: firstBtn, isSelect:false)
firstBtn.addTarget(self, action: #selector(didOptionBtnClicked(_:)), for: .touchUpInside)
self.addSubview(firstBtn)
let secondBtn = self.createOptionButton()
secondBtn.tag = baseBtnTag + 1
setOptionBtnSelected(btn: secondBtn, isSelect:false)
secondBtn.addTarget(self, action: #selector(didOptionBtnClicked(_:)), for: .touchUpInside)
self.addSubview(secondBtn)
self.addSubview(lineView)
lineView.snp.makeConstraints { make in
make.left.equalTo(0)
make.right.equalTo(0)
make.top.equalTo(0)
make.height.equalTo(0.5)
}
titleView.snp.makeConstraints { make in
make.left.equalTo(0)
make.top.equalTo(titleGap)
make.bottom.equalTo(-titleGap)
make.width.equalTo(titleMaxWidth)
}
titleLabel.snp.makeConstraints { make in
make.edges.equalToSuperview()
}
secondBtn.snp.makeConstraints { make in
make.right.equalTo(-18)
make.size.equalTo(CGSize(width: 69, height: 32))
make.centerY.equalTo(titleView)
}
firstBtn.snp.makeConstraints { make in
make.right.equalTo(secondBtn.snp.left).offset(-8)
make.size.equalTo(CGSize(width: 69, height: 32))
make.centerY.equalTo(titleView)
}
}
@objc func didOptionBtnClicked(_ sender: UIButton) {
if let btn1 = self.viewWithTag(baseBtnTag + 0) as? UIButton {
setOptionBtnSelected(btn: btn1, isSelect: sender.tag == baseBtnTag + 0)
}
if let btn2 = self.viewWithTag(baseBtnTag + 1) as? UIButton {
setOptionBtnSelected(btn: btn2, isSelect: sender.tag == baseBtnTag + 1)
}
}
func getHeight(text:String, font:UIFont, width:CGFloat)->CGFloat {
let size = CGSize.init(width:width , height: CGFloat(MAXFLOAT))
let dic = [NSAttributedString.Key.font: font]
let strSize = text.boundingRect(with: size, options: [.usesLineFragmentOrigin], attributes: dic, context:nil).size
return CGSizeMake(strSize.width, ceil(strSize.height)).height
}
}
//
// YHInfoItemSelectSheetView.swift
// galaxy
//
// Created by edy on 2024/8/19.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHInfoItemSelectSheetView: UIView {
var titleMaxWidth = 112.0
var title: String = "" {
didSet {
titleLabel.text = title
}
}
var detail: String = "" {
didSet {
detailLabel.text = detail
}
}
var isShowDetailOneline:Bool = false {
didSet {
detailLabel.textAlignment = isShowDetailOneline ? .right : .left
detailLabel.numberOfLines = isShowDetailOneline ? 1 : 0
detailLabel.snp.remakeConstraints { make in
make.top.equalTo(16)
make.right.equalTo(arrowImgView.snp.left)
make.bottom.equalTo(-16)
if isShowDetailOneline {
make.height.equalTo(20)
} else {
make.left.equalTo(titleLabel.snp.right)
}
}
self.setNeedsLayout()
self.layoutIfNeeded()
}
}
lazy var lineView: UIView = {
let view = UIView()
view.backgroundColor = .separatorColor
return view
}()
lazy var titleLabel: UILabel = {
let label = UILabel()
label.numberOfLines = 0
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)
return label
}()
lazy var arrowImgView: UIImageView = {
let view = UIImageView(image: UIImage(named: "family_info_arrow"))
return view
}()
override init(frame: CGRect) {
super.init(frame: frame)
createUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func createUI() {
self.addSubview(titleLabel)
self.addSubview(detailLabel)
self.addSubview(arrowImgView)
self.addSubview(lineView)
lineView.snp.makeConstraints { make in
make.left.equalTo(0)
make.right.equalTo(0)
make.top.equalTo(0)
make.height.equalTo(0.5)
}
titleLabel.snp.makeConstraints { make in
make.left.equalTo(0)
make.top.equalTo(16)
make.width.equalTo(titleMaxWidth)
}
detailLabel.snp.makeConstraints { make in
make.top.equalTo(16)
make.left.equalTo(titleLabel.snp.right)
make.right.equalTo(arrowImgView.snp.left)
make.bottom.equalTo(-16)
}
arrowImgView.snp.makeConstraints { make in
make.width.height.equalTo(22)
make.top.equalTo(15)
make.right.equalTo(0)
}
}
}
//
// YHSelectApplicantCell.swift
// galaxy
//
// Created by edy on 2024/8/19.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHSelectApplicantCell: UICollectionViewCell {
static let cellReuseIdentifier = "YHSelectApplicantCell"
lazy var selectImgView:UIImageView = {
let view = UIImageView(image: UIImage(named: ""))
return view
}()
lazy var nameLabel: UILabel = {
let label = UILabel()
label.font = UIFont.PFSC_R(ofSize: 14)
label.textColor = .mainTextColor
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(selectImgView)
self.addSubview(nameLabel)
selectImgView.snp.makeConstraints { make in
make.left.equalTo(0)
make.width.height.equalTo(14)
make.centerY.equalToSuperview()
}
nameLabel.snp.makeConstraints { make in
make.left.equalTo(selectImgView.snp.right).offset(6)
make.centerY.equalToSuperview()
make.right.equalToSuperview()
}
}
func updateApplicantInfo(_ applicant: YHSelectApplicantInfo) {
nameLabel.text = applicant.name
let imgName = applicant.isSelect ? "login_privacy_agree" : "login_privacy_disagree_glay"
selectImgView.image = UIImage(named: imgName)
}
}
//
// YHSelectApplicantGroupCell.swift
// galaxy
//
// Created by edy on 2024/8/19.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import AttributedString
class YHSelectApplicantInfo {
var name: String = ""
var isSelect: Bool = false
init(name: String, isSelect: Bool) {
self.name = name
self.isSelect = isSelect
}
}
class YHSelectApplicantGroupCell: UITableViewCell {
static let cellReuseIdentifier = "YHSelectApplicantGroupCell"
lazy var selecters:[YHSelectApplicantInfo] = {
return [YHSelectApplicantInfo(name: "李小龙", isSelect: true),
YHSelectApplicantInfo(name: "成龙", isSelect: false),
YHSelectApplicantInfo(name: "甄子丹", isSelect: true),
YHSelectApplicantInfo(name: "吉田双阴", isSelect: false),]
}()
lazy var whiteContentView: UIView = {
let view = UIView()
view.backgroundColor = .white
view.layer.cornerRadius = kCornerRadius6
return view
}()
lazy var lineView: UIView = {
let view = UIView()
view.backgroundColor = .separatorColor
return view
}()
lazy var titleLabel: UILabel = {
let label = UILabel()
label.numberOfLines = 0
let a: ASAttributedString = .init("*", .font(UIFont.PFSC_M(ofSize: 17)),.foreground(UIColor.failColor))
let b: ASAttributedString = .init("请您确认第一批赴港信息", .font(UIFont.PFSC_M(ofSize: 17)),.foreground(UIColor.mainTextColor))
label.attributed.text = a+b
return label
}()
lazy var detailLabel: UILabel = {
let label = UILabel()
label.numberOfLines = 0
label.font = UIFont.PFSC_R(ofSize: 14)
label.textColor = .mainTextColor
label.text = "选择第一批赴港激活签证的申请人"
return label
}()
lazy var selectGroupView: UIView = {
let view = UIView()
view.backgroundColor = .init(hex: 0xF8F9FB)
view.layer.cornerRadius = kCornerRadius3
return view
}()
lazy var collectionView: UICollectionView = {
let layout = UICollectionViewFlowLayout()
layout.scrollDirection = .vertical
layout.minimumInteritemSpacing = 0
layout.minimumLineSpacing = 16
let collectView = UICollectionView(frame:.zero, collectionViewLayout: layout)
collectView.delegate = self
collectView.dataSource = self
collectView.backgroundColor = .clear
// 注册自定义单元格
collectView.register(YHSelectApplicantCell.self, forCellWithReuseIdentifier: YHSelectApplicantCell.cellReuseIdentifier)
return collectView
}()
lazy var optionsView: YHInfoItemOptionView = {
let view = YHInfoItemOptionView(frame: .zero)
view.titleGap = 22.0
view.title = "赴港办证时间"
view.setOptions(["具体日期", "具体时段"])
view.selectIndex = 0
view.selectBlock = {
index in
}
return view
}()
lazy var timeSelectView: YHInfoItemSelectSheetView = {
let view = YHInfoItemSelectSheetView(frame: .zero)
view.isShowDetailOneline = true
view.title = "具体日期"
view.detail = "2024-03-14 ~ 2024-03-14 "
return view
}()
lazy var locationSelectView: YHInfoItemSelectSheetView = {
let view = YHInfoItemSelectSheetView(frame: .zero)
view.title = "港府办证地点"
view.detail = "九龙办事处(长沙湾) "
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(whiteContentView)
whiteContentView.addSubview(titleLabel)
whiteContentView.addSubview(lineView)
whiteContentView.addSubview(detailLabel)
whiteContentView.addSubview(selectGroupView)
selectGroupView.addSubview(collectionView)
whiteContentView.addSubview(optionsView)
whiteContentView.addSubview(timeSelectView)
whiteContentView.addSubview(locationSelectView)
whiteContentView.snp.makeConstraints { make in
make.top.equalTo(16)
make.left.equalTo(16)
make.right.equalTo(-16)
make.bottom.equalTo(0)
}
titleLabel.snp.makeConstraints { make in
make.top.equalTo(18)
make.left.equalTo(18)
make.right.equalTo(-18)
}
lineView.snp.makeConstraints { make in
make.top.equalTo(titleLabel.snp.bottom).offset(12)
make.left.right.equalToSuperview()
make.height.equalTo(0.5)
}
detailLabel.snp.makeConstraints { make in
make.top.equalTo(lineView.snp.bottom).offset(16)
make.left.equalTo(18)
make.right.equalTo(-18)
}
selectGroupView.snp.makeConstraints { make in
make.left.equalTo(18)
make.right.equalTo(-18)
make.top.equalTo(detailLabel.snp.bottom).offset(12)
}
collectionView.snp.makeConstraints { make in
make.left.equalTo(14)
make.right.equalTo(-14)
make.height.equalTo(40+16)
make.top.equalTo(14)
make.bottom.equalTo(-14)
}
optionsView.snp.makeConstraints { make in
make.top.equalTo(selectGroupView.snp.bottom).offset(16)
make.left.equalTo(18)
make.right.equalTo(0)
}
timeSelectView.snp.makeConstraints { make in
make.top.equalTo(optionsView.snp.bottom).offset(0)
make.left.equalTo(18)
make.right.equalTo(-18)
}
locationSelectView.snp.makeConstraints { make in
make.top.equalTo(timeSelectView.snp.bottom).offset(0)
make.left.equalTo(18)
make.right.equalTo(-18)
make.bottom.equalToSuperview()
}
}
}
extension YHSelectApplicantGroupCell: UICollectionViewDelegate, UICollectionViewDataSource, UICollectionViewDelegateFlowLayout {
// 返回单元格数量
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
return selecters.count
}
// 返回每个单元格的大小
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
return CGSize(width: floorl(collectionView.width/3.0), height: 20)
}
// 返回自定义单元格
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: YHSelectApplicantCell.cellReuseIdentifier, for: indexPath) as! YHSelectApplicantCell
if 0 <= indexPath.item && indexPath.item < selecters.count {
let applicant = selecters[indexPath.item]
cell.updateApplicantInfo(applicant)
}
return cell
}
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
if 0 <= indexPath.item && indexPath.item < selecters.count {
let text = selecters[indexPath.item]
}
}
}
...@@ -13,7 +13,7 @@ struct YHSmsCodeViewConfig { ...@@ -13,7 +13,7 @@ struct YHSmsCodeViewConfig {
var textColor : UIColor? = UIColor.mainTextColor var textColor : UIColor? = UIColor.mainTextColor
var bgColor : UIColor? = UIColor.clear var bgColor : UIColor? = UIColor.clear
var cursorColor : UIColor? = UIColor.brandMainColor var cursorColor : UIColor? = UIColor.brandMainColor
var font: UIFont? = UIFont(name: "DINAlternate-Bold", size: 18) var font: UIFont? = UIFont(name: "DINAlternate-Bold", size: 30)
// 展示输入框个数 // 展示输入框个数
var count : Int = 6 var count : Int = 6
var width : Double = 46.0 var width : Double = 46.0
......
...@@ -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 = YHCertificateAppointViewController()
self.navigationController?.pushViewController(vc) self.navigationController?.pushViewController(vc)
return return
} }
......
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