Commit 4d0cad51 authored by Alex朱枝文's avatar Alex朱枝文

在港记录页面完善

parent 183939ae
......@@ -578,6 +578,15 @@
04F2434D2C9BB72500DF2C74 /* YHHKRecordsDurationItemCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04F2434C2C9BB72500DF2C74 /* YHHKRecordsDurationItemCell.swift */; };
04F2434F2C9BB74E00DF2C74 /* YHHKRecordsOccupyingSpaceCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04F2434E2C9BB74E00DF2C74 /* YHHKRecordsOccupyingSpaceCell.swift */; };
04F243512C9BB89200DF2C74 /* YHHKRecordsSectionItemBaseCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04F243502C9BB89200DF2C74 /* YHHKRecordsSectionItemBaseCell.swift */; };
04F243532C9C434100DF2C74 /* YHHKRecordsCustomerItemCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04F243522C9C434100DF2C74 /* YHHKRecordsCustomerItemCell.swift */; };
04F243552C9C435A00DF2C74 /* YHHKRecordsInfoItemCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04F243542C9C435A00DF2C74 /* YHHKRecordsInfoItemCell.swift */; };
04F243572C9C437F00DF2C74 /* YHHKRecordsRemarkCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04F243562C9C437F00DF2C74 /* YHHKRecordsRemarkCell.swift */; };
04F243592C9C43A100DF2C74 /* YHHKRecordsEditButtonCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04F243582C9C43A100DF2C74 /* YHHKRecordsEditButtonCell.swift */; };
04F2435B2C9D140C00DF2C74 /* YHHKRecordsTitleCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04F2435A2C9D140C00DF2C74 /* YHHKRecordsTitleCell.swift */; };
04F2435D2C9D153C00DF2C74 /* YHHKRecordsTimeSelectCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04F2435C2C9D153C00DF2C74 /* YHHKRecordsTimeSelectCell.swift */; };
04F2435F2C9D1C0600DF2C74 /* YHHKRecordsStayingPersonnelCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04F2435E2C9D1C0600DF2C74 /* YHHKRecordsStayingPersonnelCell.swift */; };
04F243612C9D488200DF2C74 /* YHHKRecordsPersonnelSelectCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04F243602C9D488200DF2C74 /* YHHKRecordsPersonnelSelectCell.swift */; };
04F243632C9D4C9700DF2C74 /* YHBaseCornerRadiusBorderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04F243622C9D4C9700DF2C74 /* YHBaseCornerRadiusBorderView.swift */; };
04F316442C3568F000024164 /* YHAboutGalaxyViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04F316432C3568F000024164 /* YHAboutGalaxyViewController.swift */; };
04F4B76B2BAA7E1E00D13284 /* YHCertificateTemplateSheetView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04F4B76A2BAA7E1E00D13284 /* YHCertificateTemplateSheetView.swift */; };
04F5F86A2C1A95BB004A463C /* YHOtherServiceViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04F5F8692C1A95BB004A463C /* YHOtherServiceViewController.swift */; };
......@@ -1408,6 +1417,15 @@
04F2434C2C9BB72500DF2C74 /* YHHKRecordsDurationItemCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHKRecordsDurationItemCell.swift; sourceTree = "<group>"; };
04F2434E2C9BB74E00DF2C74 /* YHHKRecordsOccupyingSpaceCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHKRecordsOccupyingSpaceCell.swift; sourceTree = "<group>"; };
04F243502C9BB89200DF2C74 /* YHHKRecordsSectionItemBaseCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHKRecordsSectionItemBaseCell.swift; sourceTree = "<group>"; };
04F243522C9C434100DF2C74 /* YHHKRecordsCustomerItemCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHKRecordsCustomerItemCell.swift; sourceTree = "<group>"; };
04F243542C9C435A00DF2C74 /* YHHKRecordsInfoItemCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHKRecordsInfoItemCell.swift; sourceTree = "<group>"; };
04F243562C9C437F00DF2C74 /* YHHKRecordsRemarkCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHKRecordsRemarkCell.swift; sourceTree = "<group>"; };
04F243582C9C43A100DF2C74 /* YHHKRecordsEditButtonCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHKRecordsEditButtonCell.swift; sourceTree = "<group>"; };
04F2435A2C9D140C00DF2C74 /* YHHKRecordsTitleCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHKRecordsTitleCell.swift; sourceTree = "<group>"; };
04F2435C2C9D153C00DF2C74 /* YHHKRecordsTimeSelectCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHKRecordsTimeSelectCell.swift; sourceTree = "<group>"; };
04F2435E2C9D1C0600DF2C74 /* YHHKRecordsStayingPersonnelCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHKRecordsStayingPersonnelCell.swift; sourceTree = "<group>"; };
04F243602C9D488200DF2C74 /* YHHKRecordsPersonnelSelectCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHKRecordsPersonnelSelectCell.swift; sourceTree = "<group>"; };
04F243622C9D4C9700DF2C74 /* YHBaseCornerRadiusBorderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHBaseCornerRadiusBorderView.swift; sourceTree = "<group>"; };
04F316432C3568F000024164 /* YHAboutGalaxyViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAboutGalaxyViewController.swift; sourceTree = "<group>"; };
04F4B76A2BAA7E1E00D13284 /* YHCertificateTemplateSheetView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateTemplateSheetView.swift; sourceTree = "<group>"; };
04F5F8692C1A95BB004A463C /* YHOtherServiceViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHOtherServiceViewController.swift; sourceTree = "<group>"; };
......@@ -3515,6 +3533,14 @@
04F243342C95801B00DF2C74 /* V */ = {
isa = PBXGroup;
children = (
04F243522C9C434100DF2C74 /* YHHKRecordsCustomerItemCell.swift */,
04F243542C9C435A00DF2C74 /* YHHKRecordsInfoItemCell.swift */,
04F243562C9C437F00DF2C74 /* YHHKRecordsRemarkCell.swift */,
04F243582C9C43A100DF2C74 /* YHHKRecordsEditButtonCell.swift */,
04F2435A2C9D140C00DF2C74 /* YHHKRecordsTitleCell.swift */,
04F2435C2C9D153C00DF2C74 /* YHHKRecordsTimeSelectCell.swift */,
04F2435E2C9D1C0600DF2C74 /* YHHKRecordsStayingPersonnelCell.swift */,
04F243602C9D488200DF2C74 /* YHHKRecordsPersonnelSelectCell.swift */,
04F243422C9BB3F800DF2C74 /* YHHKRecordsHeaderCell.swift */,
04F243442C9BB6A000DF2C74 /* YHHKRecordsExpandedCell.swift */,
04F243502C9BB89200DF2C74 /* YHHKRecordsSectionItemBaseCell.swift */,
......@@ -4245,6 +4271,7 @@
04AAA8DB2BF5E5A200FE9FD5 /* YHEmptyDataView.swift */,
A59B43CE2C4B5AD100B28379 /* YHShareViewOnTablebarView.swift */,
0418921E2C91BAAC00B9FB94 /* YHBaseDynamicCornerRadiusView.swift */,
04F243622C9D4C9700DF2C74 /* YHBaseCornerRadiusBorderView.swift */,
04F2432E2C94704200DF2C74 /* YHPaddedLabel.swift */,
);
path = V;
......@@ -4775,6 +4802,7 @@
A5FF0F3E2C32F2590069852B /* YHActivityDetailCell2.swift in Sources */,
04256DD42C70538400A37BA4 /* YHFamilyInfoUpdateViewController.swift in Sources */,
04FD85702C21646200BEF9C5 /* YHMyInterestTopicCell.swift in Sources */,
04F243592C9C43A100DF2C74 /* YHHKRecordsEditButtonCell.swift in Sources */,
A5CA3F542C744CAB00EB22F5 /* YHUploadCertificateDetailCell.swift in Sources */,
04A7BD172BA43A0F00BD35A2 /* YHMyDocumentsDetailViewModel.swift in Sources */,
04256DF82C73726C00A37BA4 /* YHCerAppointViewModel.swift in Sources */,
......@@ -4813,6 +4841,7 @@
045EEF132B9F171A0022A143 /* YHCountryMessage.swift in Sources */,
04EC2F812C22888E002907D7 /* YHFriendRequestView.swift in Sources */,
044EE24C2C94396E00A2FE3A /* YHResignCertificatePassportTableViewCell.swift in Sources */,
04F2435B2C9D140C00DF2C74 /* YHHKRecordsTitleCell.swift in Sources */,
041892242C91BCF100B9FB94 /* YHResignRoundCellType.swift in Sources */,
0430E6722C749E74000511E2 /* YHAdopterBirthViewController.swift in Sources */,
048058392C7F289700502CAA /* YHTravelCertificateItemView.swift in Sources */,
......@@ -4870,12 +4899,14 @@
04B360F32C636525001EB053 /* YHPrincipleWaitResultViewController.swift in Sources */,
04358E0A2C7835B000811928 /* YHMakeCertificatePlaceModel.swift in Sources */,
A582B2412BB95998009D098C /* YHHKPlanTipsCell.swift in Sources */,
04F243552C9C435A00DF2C74 /* YHHKRecordsInfoItemCell.swift in Sources */,
A5D0012C2BABC84A001F003C /* YHFileListBottomView.swift in Sources */,
0485DFDC2C670C7200B50293 /* YHPrincipleSendMailView.swift in Sources */,
04E41DE82BD240570077EAE3 /* YHOrderDetailViewController.swift in Sources */,
A5FD63C52B637EE000D1D9DA /* YHSubmitAllInfoCheckView.swift in Sources */,
045EEF222B9F171A0022A143 /* YHImagePickerView.swift in Sources */,
A5ACE9442B4564F7002C94D2 /* Array+Extension.swift in Sources */,
04F243632C9D4C9700DF2C74 /* YHBaseCornerRadiusBorderView.swift in Sources */,
0435FA812BA186D600024EAE /* YHMyFileMethodTableViewCell.swift in Sources */,
F8BAADA32C4FB41F0074D6C3 /* YHUatHelper.swift in Sources */,
0468D4282B50D4AF00CFB916 /* YHPrivacyAlertView.swift in Sources */,
......@@ -4993,6 +5024,7 @@
0419A09A2C48F87B00A5FCFA /* YHInvitationWithGiftsViewController.swift in Sources */,
04F5F86E2C1AC351004A463C /* YHHKEventCenterViewController.swift in Sources */,
A567E5922BD7643D00D5D5A0 /* YHHomeWebViewModel.swift in Sources */,
04F243572C9C437F00DF2C74 /* YHHKRecordsRemarkCell.swift in Sources */,
A5D5ADEF2BB90FBC0039FA6B /* YHCheckEamilAlertView.swift in Sources */,
04A671602BA0280800C1FB91 /* YHFileRenameInputView.swift in Sources */,
A5ACE93F2B4564F7002C94D2 /* UIViewController+Extension.swift in Sources */,
......@@ -5115,6 +5147,7 @@
A5EB6C722C69FB9A0081FB6C /* YHOffivialApprovalGuildLineCheckView.swift in Sources */,
04256E272C77127600A37BA4 /* YHWaitAppointMembersCell.swift in Sources */,
047AA3D72C4A4399009C4554 /* YHInvitationWithGiftsShareView.swift in Sources */,
04F243532C9C434100DF2C74 /* YHHKRecordsCustomerItemCell.swift in Sources */,
A58A8C8F2BA6978100632765 /* YHMineCertificateEntryViewController.swift in Sources */,
045EEF1B2B9F171A0022A143 /* YHAddressPickViewTableViewCell.swift in Sources */,
04213B2F2C49154900797900 /* YHHomeInfoDetailContainerViewController.swift in Sources */,
......@@ -5214,6 +5247,7 @@
04A671622BA058DE00C1FB91 /* YHCertificateEditSheetView.swift in Sources */,
04AD317D2C295AE800DF5655 /* YHUserInfoSettingViewModel.swift in Sources */,
045A08C22C37EB8B00BCBABA /* YHMyFileListNoneCell.swift in Sources */,
04F2435F2C9D1C0600DF2C74 /* YHHKRecordsStayingPersonnelCell.swift in Sources */,
A5EB6C732C69FB9A0081FB6C /* YHOffivialApprovalSuccessCheckView.swift in Sources */,
04FD85682C21277800BEF9C5 /* YHMyNameCardAvatarInfoCell.swift in Sources */,
A566A79A2C219FA400980D06 /* YHHomeSalonAreaView.swift in Sources */,
......@@ -5332,6 +5366,7 @@
A517A4E12BB573EB000DEECD /* YHDocListCell.swift in Sources */,
A58037212BAD7B2A0031C312 /* YHMySchemeModel.swift in Sources */,
0493B3DE2BA80C2300AF9393 /* YHCertificateFilterButton.swift in Sources */,
04F2435D2C9D153C00DF2C74 /* YHHKRecordsTimeSelectCell.swift in Sources */,
0430E6902C7EC78C000511E2 /* YHCardUploadView.swift in Sources */,
04FA8B2B2C06F59D00ABE43F /* YHAppleLoginManager.swift in Sources */,
048058372C7F03B500502CAA /* YHTravelCertificateUploadCell.swift in Sources */,
......@@ -5402,6 +5437,7 @@
045EEF092B9F171A0022A143 /* YHBasicInfoFillModel.swift in Sources */,
044EE2422C92EF0C00A2FE3A /* YHResignCertificateDetailEVisaViewController.swift in Sources */,
A5ACE9352B4564F7002C94D2 /* YHNetRequest.swift in Sources */,
04F243612C9D488200DF2C74 /* YHHKRecordsPersonnelSelectCell.swift in Sources */,
A5FD63CB2B63D6C300D1D9DA /* YHInformationFillTipsCell.swift in Sources */,
04F9574B2C2032D8003C631C /* YHMyFriendsCell.swift in Sources */,
0430E65E2C74624E000511E2 /* YHAdopterCardTableViewCell.swift in Sources */,
......
//
// YHBaseCornerRadiusBorderView.swift
// galaxy
//
// Created by alexzzw on 2024/9/20.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHBaseCornerRadiusBorderView: UIView {
private var radius: CGFloat = 2
private var corner: UIRectCorner = .allCorners
var lineWidth: CGFloat? {
didSet {
if lineWidth != oldValue {
boarderLayers?.forEach {
$0.removeFromSuperlayer()
}
boarderLayers = nil
boarderLayers = createRoundedCornersAndBorder(corners: corner, radii: CGSize(width: radius, height: radius), lineWidth: lineWidth, lineColor: lineColor)
}
}
}
var lineColor: CGColor? {
didSet {
if lineColor != oldValue {
boarderLayers?.forEach {
$0.removeFromSuperlayer()
}
boarderLayers = nil
boarderLayers = createRoundedCornersAndBorder(corners: corner, radii: CGSize(width: radius, height: radius), lineWidth: lineWidth, lineColor: lineColor)
}
}
}
public init(cornerRadius: CGFloat, corner: UIRectCorner, lineWidth: CGFloat?, lineColor: CGColor?) {
self.corner = corner
self.radius = cornerRadius
self.lineWidth = lineWidth
self.lineColor = lineColor
super.init(frame: CGRect.zero)
}
@available(*, unavailable)
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
private var boarderLayers: [CAShapeLayer]?
private var viewBounds = CGRect.zero {
didSet {
guard viewBounds != oldValue else {
return
}
boarderLayers?.forEach {
$0.removeFromSuperlayer()
}
boarderLayers = nil
boarderLayers = createRoundedCornersAndBorder(corners: corner, radii: CGSize(width: radius, height: radius), lineWidth: lineWidth, lineColor: lineColor)
}
}
override public func layoutSubviews() {
super.layoutSubviews()
viewBounds = bounds
}
}
......@@ -34,6 +34,9 @@ class YHBaseDynamicCornerRadiusView: UIView {
private var viewBounds = CGRect.zero {
didSet {
guard viewBounds != oldValue else {
return
}
boarderLayer?.removeFromSuperlayer()
boarderLayer = nil
if let corner = corner {
......
......@@ -11,24 +11,30 @@ import JXSegmentedView
class YHHKRecordsContentVC: YHBaseViewController {
private lazy var tableView: UITableView = {
let view = UITableView(frame:.zero, style:.grouped)
view.estimatedSectionHeaderHeight = 16.0
view.estimatedSectionFooterHeight = 0.01
view.sectionHeaderHeight = 16.0
view.sectionFooterHeight = 0.01
view.contentInsetAdjustmentBehavior = .never
view.showsVerticalScrollIndicator = false
view.separatorStyle = .none
view.delegate = self
view.dataSource = self
view.backgroundColor = .clear
view.rowHeight = 52
view.tableFooterView = UITableViewHeaderFooterView()
view.register(YHResignDocumentHeaderCell.self, forCellReuseIdentifier: YHResignDocumentHeaderCell.cellReuseIdentifier)
view.register(YHResignDocumentContentCell.self, forCellReuseIdentifier: YHResignDocumentContentCell.cellReuseIdentifier)
return view
}()
override func viewDidLoad() {
super.viewDidLoad()
setupUI()
// Do any additional setup after loading the view.
}
/*
// MARK: - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
// Get the new view controller using segue.destination.
// Pass the selected object to the new view controller.
}
*/
}
extension YHHKRecordsContentVC {
......@@ -36,6 +42,13 @@ extension YHHKRecordsContentVC {
gk_navBarAlpha = 0
gk_navigationBar.isHidden = true
view.backgroundColor = UIColor.contentBkgColor
view.addSubview(tableView)
tableView.snp.makeConstraints { make in
make.left.equalToSuperview()
make.right.equalToSuperview()
make.top.bottom.equalToSuperview()
}
tableView.tableFooterView = UIView(frame: CGRect.init(x: 0, y: 0, width: KScreenWidth, height: kMargin))
}
}
......@@ -44,3 +57,29 @@ extension YHHKRecordsContentVC: JXSegmentedListContainerViewListDelegate {
return view
}
}
extension YHHKRecordsContentVC: UITableViewDelegate, UITableViewDataSource {
func numberOfSections(in tableView: UITableView) -> Int {
0
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
0
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
return UITableViewCell()
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
//
}
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
return UIView()
}
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
return UIView()
}
}
//
// YHHKRecordsCustomerItemCell.swift
// galaxy
//
// Created by alexzzw on 2024/9/19.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHHKRecordsCustomerItemCell: YHResignDocumentCell {
static let cellReuseIdentifier = "YHHKRecordsCustomerItemCell"
private lazy var infoTitleLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_M(ofSize: 17)
label.textColor = UIColor(hexString: "#222222")
return label
}()
private lazy var infoDetailLabel: UILabel = {
let label = UILabel()
label.textColor = .mainTextColor50
label.font = .PFSC_R(ofSize: 14)
return label
}()
private lazy var bottomLineView: UIView = {
let view = UIView()
view.backgroundColor = .separatorColor
return view
}()
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setupCellInfo(title: String?, detail: String?) {
infoTitleLabel.text = title
infoDetailLabel.text = detail
}
}
extension YHHKRecordsCustomerItemCell {
private func setupUI() {
updateCellCorner(.top)
subContainerView.addSubview(infoTitleLabel)
subContainerView.addSubview(infoDetailLabel)
subContainerView.addSubview(bottomLineView)
infoTitleLabel.setContentCompressionResistancePriority(.required, for: .horizontal)
infoDetailLabel.setContentCompressionResistancePriority(.defaultLow, for: .horizontal)
bottomLineView.snp.makeConstraints { make in
make.bottom.equalToSuperview()
make.left.equalToSuperview().offset(18)
make.right.equalToSuperview().offset(-18)
make.height.equalTo(1)
}
infoTitleLabel.snp.makeConstraints { make in
make.left.equalToSuperview().offset(18)
make.top.equalToSuperview().offset(16)
make.bottom.equalToSuperview().offset(-12)
}
infoDetailLabel.snp.makeConstraints { make in
make.left.greaterThanOrEqualTo(infoTitleLabel.snp.right).offset(6)
make.centerY.equalTo(infoTitleLabel)
make.right.equalToSuperview().offset(-18)
}
}
}
......@@ -14,7 +14,7 @@ class YHHKRecordsDurationItemCell: YHHKRecordsSectionItemBaseCell {
private lazy var infoTitleLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_R(ofSize:14)
label.font = .PFSC_R(ofSize: 14)
label.textColor = .mainTextColor70
return label
}()
......
//
// YHHKRecordsEditButtonCell.swift
// galaxy
//
// Created by alexzzw on 2024/9/19.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHHKRecordsEditButtonCell: YHResignDocumentCell {
static let cellReuseIdentifier = "YHHKRecordsEditButtonCell"
private lazy var centerLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_M(ofSize: 14)
label.textColor = UIColor(hexString: "#222222")
return label
}()
private lazy var topLineView: UIView = {
let view = UIView()
view.backgroundColor = .separatorColor
return view
}()
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setupCellInfo(title: String?) {
centerLabel.text = title
}
}
extension YHHKRecordsEditButtonCell {
private func setupUI() {
updateCellCorner(.bottom)
subContainerView.addSubview(centerLabel)
subContainerView.addSubview(topLineView)
topLineView.snp.makeConstraints { make in
make.top.equalToSuperview()
make.left.equalToSuperview()
make.right.equalToSuperview()
make.height.equalTo(1)
}
centerLabel.snp.makeConstraints { make in
make.center.equalToSuperview()
}
}
}
......@@ -13,7 +13,7 @@ class YHHKRecordsHeaderCell: UITableViewCell {
private lazy var infoTitleLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_M(ofSize:17)
label.font = .PFSC_M(ofSize: 17)
label.textColor = .mainTextColor
return label
}()
......@@ -55,7 +55,7 @@ extension YHHKRecordsHeaderCell {
make.left.equalToSuperview().offset(18)
make.right.lessThanOrEqualToSuperview().offset(-18)
make.top.equalToSuperview().offset(16)
make.bottom.equalTo(bottomLineView.snp.top).offset(-12)
make.bottom.equalToSuperview().offset(-12)
}
}
}
//
// YHHKRecordsInfoItemCell.swift
// galaxy
//
// Created by alexzzw on 2024/9/19.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHHKRecordsInfoItemCell: YHResignDocumentCell {
static let cellReuseIdentifier = "YHHKRecordsInfoItemCell"
private lazy var infoTitleLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_R(ofSize: 14)
label.textColor = .mainTextColor50
return label
}()
private lazy var infoDetailLabel: UILabel = {
let label = UILabel()
label.textColor = .mainTextColor
label.font = .PFSC_R(ofSize: 14)
return label
}()
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setupCellInfo(title: String?, detail: String?, topMargin: CGFloat = 18, bottomMargin: CGFloat = 18) {
infoTitleLabel.text = title
infoDetailLabel.text = detail
infoTitleLabel.snp.remakeConstraints { make in
make.left.equalToSuperview().offset(18)
make.top.equalToSuperview().offset(topMargin)
make.bottom.equalToSuperview().offset(-bottomMargin)
}
}
}
extension YHHKRecordsInfoItemCell {
private func setupUI() {
updateCellCorner(.mid)
subContainerView.addSubview(infoTitleLabel)
subContainerView.addSubview(infoDetailLabel)
infoTitleLabel.setContentCompressionResistancePriority(.required, for: .horizontal)
infoDetailLabel.setContentCompressionResistancePriority(.defaultLow, for: .horizontal)
infoTitleLabel.snp.makeConstraints { make in
make.left.equalToSuperview().offset(18)
make.top.equalToSuperview().offset(9)
make.bottom.equalToSuperview().offset(-9)
}
infoDetailLabel.snp.makeConstraints { make in
make.left.greaterThanOrEqualTo(infoTitleLabel.snp.right).offset(6)
make.centerY.equalTo(infoTitleLabel)
make.right.equalToSuperview().offset(-18)
}
}
}
......@@ -14,7 +14,7 @@ class YHHKRecordsLastStayCell: YHHKRecordsSectionItemBaseCell {
private lazy var infoTitleLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_R(ofSize:14)
label.font = .PFSC_R(ofSize: 14)
label.textColor = .mainTextColor50
return label
}()
......
//
// YHHKRecordsPersonnelSelectCell.swift
// galaxy
//
// Created by alexzzw on 2024/9/20.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHHKRecordsPersonnelSelectCell: UICollectionViewCell {
static let cellReuseIdentifier = "YHHKRecordsPersonnelSelectCell"
static let cellHeight: CGFloat = 32
static let offsetX: CGFloat = 10
static let labelFont = UIFont.PFSC_R(ofSize: 13)
let defaultBgColor: UIColor = .contentBkgColor
let defaultFontColor: UIColor = .mainTextColor
let selectedBgColor: UIColor = .brandMainColor8
let selectedFontColor: UIColor = .brandMainColor
let selectedBorderColor: UIColor = .brandMainColor
private lazy var backCover: YHBaseCornerRadiusBorderView = {
let view = YHBaseCornerRadiusBorderView(cornerRadius: 3, corner: .allCorners, lineWidth: nil, lineColor: selectedBorderColor.cgColor)
view.backgroundColor = defaultBgColor
return view
}()
private lazy var tagLabel: UILabel = {
let label = UILabel(frame: CGRect.zero)
label.textColor = defaultFontColor
label.font = YHHKRecordsPersonnelSelectCell.labelFont
label.textAlignment = .center
label.lineBreakMode = .byTruncatingTail
return label
}()
private lazy var selctedBadgeIcon: UIImageView = {
let view = UIImageView()
view.image = UIImage(named: "personnel_selected_badge")
view.isHidden = true
return view
}()
override init(frame: CGRect) {
super.init(frame: frame)
configViews()
}
override var isSelected: Bool {
didSet {
if isSelected {
backCover.backgroundColor = selectedBgColor
tagLabel.textColor = selectedFontColor
backCover.lineWidth = 1
selctedBadgeIcon.isHidden = false
} else {
backCover.backgroundColor = defaultBgColor
tagLabel.textColor = defaultFontColor
backCover.lineWidth = nil
selctedBadgeIcon.isHidden = true
}
}
}
@available(*, unavailable)
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
private func configViews() {
contentView.addSubview(backCover)
backCover.addSubview(tagLabel)
backCover.addSubview(selctedBadgeIcon)
backCover.snp.makeConstraints { maker in
maker.edges.equalToSuperview()
}
tagLabel.snp.makeConstraints { maker in
maker.top.bottom.equalToSuperview()
maker.left.equalToSuperview().offset(YHHKRecordsPersonnelSelectCell.offsetX).priority(.high)
maker.right.equalToSuperview().offset(-YHHKRecordsPersonnelSelectCell.offsetX).priority(.high)
}
selctedBadgeIcon.snp.makeConstraints { make in
make.bottom.right.equalToSuperview()
make.width.height.equalTo(14)
}
}
func setupCellInfo(_ text: String?) {
tagLabel.text = text
}
}
//
// YHHKRecordsRemarkCell.swift
// galaxy
//
// Created by alexzzw on 2024/9/19.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHHKRecordsRemarkCell: YHResignDocumentCell {
static let cellReuseIdentifier = "YHHKRecordsRemarkCell"
var textViewDidChanged: ((UITextView) -> Void)?
private lazy var infoTitleLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_R(ofSize: 14)
label.textColor = .mainTextColor50
return label
}()
private lazy var remarkTextView: UITextView = {
let view = UITextView()
view.font = .PFSC_R(ofSize: 14)
view.textColor = .mainTextColor
view.tintColor = .mainTextColor
view.backgroundColor = .contentBkgColor
view.font = UIFont.systemFont(ofSize: 14)
view.returnKeyType = .default
view.enablesReturnKeyAutomatically = true
view.delegate = self
view.addObserver(self, forKeyPath: "attributedText", options: .new, context: nil)
view.textContainerInset = UIEdgeInsets.zero
view.textContainer.lineFragmentPadding = 0
return view
}()
private lazy var editTipsLabel: UILabel = {
let label = UILabel()
label.isHidden = true
label.text = "请输入备注内容"
label.font = UIFont.systemFont(ofSize: 14)
label.textColor = .mainTextColor30
return label
}()
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setupCellInfo(title: String? = "备注:", titleColor: UIColor = .mainTextColor50, detail: String?, isEditable: Bool = false, cellType: YHResignRoundCellType = .mid) {
updateCellCorner(cellType)
infoTitleLabel.text = title
remarkTextView.isEditable = isEditable
remarkTextView.text = detail
editTipsLabel.isHidden = !isEditable || (detail?.count ?? 0) > 0
}
}
extension YHHKRecordsRemarkCell {
private func setupUI() {
subContainerView.addSubview(infoTitleLabel)
subContainerView.addSubview(remarkTextView)
subContainerView.addSubview(editTipsLabel)
infoTitleLabel.snp.makeConstraints { make in
make.left.equalToSuperview().offset(18)
make.top.equalToSuperview().offset(16)
}
remarkTextView.snp.makeConstraints { make in
make.left.equalTo(infoTitleLabel)
make.right.equalToSuperview().offset(18)
make.height.equalTo(88)
make.top.equalTo(infoTitleLabel.snp.bottom).offset(8)
make.bottom.equalToSuperview().offset(-16)
}
editTipsLabel.snp.makeConstraints { make in
make.left.equalTo(remarkTextView.snp.left).offset(12)
make.top.equalTo(remarkTextView.snp.top).offset(10)
}
}
}
extension YHHKRecordsRemarkCell: UITextViewDelegate {
func textViewDidChange(_ textView: UITextView) {
editTipsLabel.isHidden = textView.text.count > 0
textViewDidChanged?(textView)
}
}
......@@ -14,7 +14,7 @@ class YHHKRecordsSectionHeaderCell: YHHKRecordsSectionItemBaseCell {
private lazy var infoTitleLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_M(ofSize:14)
label.font = .PFSC_M(ofSize: 14)
label.textColor = .mainTextColor
return label
}()
......
//
// YHHKRecordsStayingPersonnelCell.swift
// galaxy
//
// Created by alexzzw on 2024/9/20.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHHKRecordsStayingPersonnelCell: YHResignDocumentCell {
private static let offsetX: CGFloat = 18
private static let offsetTop: CGFloat = 8
private static let offsetBottom: CGFloat = 24
private static let minimumLineSpacing: CGFloat = 12
private static let minimumInteritemSpacing: CGFloat = 8
var selectItemAction: ((String?) -> Void)?
var collectionData: [String] = [] {
didSet {
infoCollectionView.reloadData()
}
}
private var minWidth: CGFloat {
return (KScreenWidth - YHHKRecordsStayingPersonnelCell.offsetX * 2 - YHHKRecordsStayingPersonnelCell.minimumLineSpacing * 3) / 4.0
}
private var maxWidth: CGFloat {
return (KScreenWidth - YHHKRecordsStayingPersonnelCell.offsetX * 2)
}
static let cellReuseIdentifier = "YHHKRecordsStayingPersonnelCell"
private lazy var asteriskIcon: UIImageView = {
let view = UIImageView()
view.image = UIImage(named: "asterisk_icon_6")
return view
}()
private lazy var infoTitleLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_R(ofSize: 14)
label.textColor = UIColor(hexString: "#222222")
return label
}()
private lazy var bottomLineView: UIView = {
let view = UIView()
view.backgroundColor = .separatorColor
return view
}()
private lazy var layout: AlignedCollectionViewFlowLayout = {
return AlignedCollectionViewFlowLayout(horizontalAlignment: .left)
}()
private lazy var infoCollectionView: UICollectionView = {
layout.minimumLineSpacing = YHHKRecordsStayingPersonnelCell.minimumLineSpacing
layout.minimumInteritemSpacing = YHHKRecordsStayingPersonnelCell.minimumInteritemSpacing
layout.scrollDirection = .vertical
layout.sectionInset = UIEdgeInsets(top: YHHKRecordsStayingPersonnelCell.offsetTop, left: YHHKRecordsStayingPersonnelCell.offsetX, bottom: YHHKRecordsStayingPersonnelCell.offsetBottom, right: YHHKRecordsStayingPersonnelCell.offsetX)
let collectionView = UICollectionView(frame: CGRect.zero, collectionViewLayout: layout)
collectionView.backgroundColor = .white
collectionView.delegate = self
collectionView.dataSource = self
collectionView.showsHorizontalScrollIndicator = false
collectionView.register(YHHKRecordsPersonnelSelectCell.self, forCellWithReuseIdentifier: YHHKRecordsPersonnelSelectCell.cellReuseIdentifier)
return collectionView
}()
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setupCellInfo(title: String?) {
infoTitleLabel.text = title
}
}
extension YHHKRecordsStayingPersonnelCell {
private func setupUI() {
updateCellCorner(.mid)
subContainerView.addSubview(asteriskIcon)
subContainerView.addSubview(infoTitleLabel)
subContainerView.addSubview(bottomLineView)
asteriskIcon.snp.makeConstraints { make in
make.left.equalToSuperview().offset(18)
make.centerY.equalTo(infoTitleLabel)
make.width.height.equalTo(6)
}
infoTitleLabel.snp.makeConstraints { make in
make.left.equalTo(asteriskIcon.snp.right).offset(2)
make.top.equalToSuperview().offset(16)
}
bottomLineView.snp.makeConstraints { make in
make.left.equalToSuperview().offset(18)
make.right.equalToSuperview().offset(-18)
make.height.equalTo(1)
}
infoCollectionView.snp.makeConstraints { make in
make.top.equalTo(infoTitleLabel.snp.bottom)
make.left.right.equalToSuperview()
make.bottom.equalTo(bottomLineView.snp.top)
}
}
}
extension YHHKRecordsStayingPersonnelCell: UICollectionViewDelegate, UICollectionViewDataSource, UICollectionViewDelegateFlowLayout {
func numberOfSections(in collectionView: UICollectionView) -> Int {
return collectionData.count > 0 ? 1 : 0
}
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
return collectionData.count
}
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
if collectionData.count > indexPath.item, let cell = collectionView.dequeueReusableCell(withReuseIdentifier: YHHKRecordsPersonnelSelectCell.cellReuseIdentifier, for: indexPath) as? YHHKRecordsPersonnelSelectCell {
let data = collectionData[indexPath.item]
cell.setupCellInfo(data)
return cell
}
return UICollectionViewCell()
}
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
if collectionData.count > indexPath.item {
let data = collectionData[indexPath.item]
let attrString = NSAttributedString(string: data, attributes: [.font: YHHKRecordsPersonnelSelectCell.labelFont])
var width = attrString.yh_width(containerHeight: YHHKRecordsPersonnelSelectCell.cellHeight) + 2 * YHHKRecordsPersonnelSelectCell.offsetX
if width < minWidth {
width = minWidth
}
if width > maxWidth {
width = maxWidth
}
return CGSize(width: width, height: YHHKRecordsPersonnelSelectCell.cellHeight)
}
return CGSize.zero
}
func collectionView(_ collectionView: UICollectionView, shouldSelectItemAt indexPath: IndexPath) -> Bool {
if collectionData.count > indexPath.item, let cell = collectionView.cellForItem(at: indexPath) as? YHHKRecordsPersonnelSelectCell {
if cell.isSelected {
collectionView.deselectItem(at: indexPath, animated: true)
selectItemAction?(nil)
return false
}
return true
}
return true
}
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
if collectionData.count > indexPath.item, let cell = collectionView.cellForItem(at: indexPath) as? YHHKRecordsPersonnelSelectCell {
let data = collectionData[indexPath.item]
selectItemAction?(cell.isSelected ? data : nil)
}
}
}
......@@ -14,7 +14,7 @@ class YHHKRecordsSummaryItemCell: YHHKRecordsSectionItemBaseCell {
private lazy var infoTitleLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_R(ofSize:14)
label.font = .PFSC_R(ofSize: 14)
label.textColor = .mainTextColor
return label
}()
......
//
// YHHKRecordsTimeSelectCell.swift
// galaxy
//
// Created by alexzzw on 2024/9/20.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHHKRecordsTimeSelectCell: YHResignDocumentCell {
static let cellReuseIdentifier = "YHHKRecordsTimeSelectCell"
private lazy var asteriskIcon: UIImageView = {
let view = UIImageView()
view.image = UIImage(named: "asterisk_icon_6")
return view
}()
private lazy var arrowIcon: UIImageView = {
let view = UIImageView()
view.image = UIImage(named: "right_arrow_black_20")
return view
}()
private lazy var infoTitleLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_R(ofSize: 14)
label.textColor = UIColor(hexString: "#222222")
return label
}()
private lazy var infoDetailLabel: UILabel = {
let label = UILabel()
label.textColor = .mainTextColor
label.font = .PFSC_M(ofSize: 14)
return label
}()
private lazy var bottomLineView: UIView = {
let view = UIView()
view.backgroundColor = .separatorColor
return view
}()
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setupCellInfo(title: String?, detail: String?) {
infoTitleLabel.text = title
infoDetailLabel.text = detail
}
}
extension YHHKRecordsTimeSelectCell {
private func setupUI() {
updateCellCorner(.mid)
subContainerView.addSubview(asteriskIcon)
subContainerView.addSubview(infoTitleLabel)
subContainerView.addSubview(infoDetailLabel)
subContainerView.addSubview(arrowIcon)
subContainerView.addSubview(bottomLineView)
infoTitleLabel.setContentCompressionResistancePriority(.required, for: .horizontal)
infoDetailLabel.setContentCompressionResistancePriority(.defaultLow, for: .horizontal)
asteriskIcon.setContentCompressionResistancePriority(.required, for: .horizontal)
arrowIcon.setContentCompressionResistancePriority(.required, for: .horizontal)
asteriskIcon.snp.makeConstraints { make in
make.left.equalToSuperview().offset(18)
make.centerY.equalToSuperview()
make.width.height.equalTo(6)
}
arrowIcon.snp.makeConstraints { make in
make.centerY.equalToSuperview()
make.right.equalToSuperview().offset(-18)
make.width.height.equalTo(20)
}
infoTitleLabel.snp.makeConstraints { make in
make.left.equalTo(asteriskIcon.snp.right).offset(2)
make.top.equalToSuperview().offset(16)
make.bottom.equalToSuperview().offset(-16)
}
infoDetailLabel.snp.makeConstraints { make in
make.centerY.equalToSuperview()
make.centerX.equalToSuperview().priority(.high)
make.left.greaterThanOrEqualTo(infoTitleLabel.snp.right).offset(4).priority(.required)
}
bottomLineView.snp.makeConstraints { make in
make.left.equalToSuperview().offset(18)
make.right.equalToSuperview().offset(-18)
make.height.equalTo(1)
}
}
}
//
// YHHKRecordsTitleCell.swift
// galaxy
//
// Created by alexzzw on 2024/9/20.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHHKRecordsTitleCell: YHResignDocumentCell {
static let cellReuseIdentifier = "YHHKRecordsHeaderCell"
private lazy var infoTitleLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_M(ofSize: 17)
label.textColor = .mainTextColor
return label
}()
private lazy var bottomLineView: UIView = {
let view = UIView()
view.backgroundColor = .separatorColor
return view
}()
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setupCellInfo(_ title: String?) {
infoTitleLabel.text = title
}
}
extension YHHKRecordsTitleCell {
private func setupUI() {
updateCellCorner(.top)
subContainerView.addSubview(infoTitleLabel)
subContainerView.addSubview(bottomLineView)
bottomLineView.snp.makeConstraints { make in
make.left.right.bottom.equalToSuperview()
make.height.equalTo(1)
}
infoTitleLabel.snp.makeConstraints { make in
make.left.equalToSuperview().offset(18)
make.right.lessThanOrEqualToSuperview().offset(-18)
make.top.equalToSuperview().offset(16)
make.bottom.equalToSuperview().offset(-12)
}
}
}
......@@ -13,7 +13,7 @@ class YHResignDocumentContentCell: YHResignDocumentCell {
private lazy var infoTitleLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_M(ofSize:14)
label.font = .PFSC_M(ofSize: 14)
label.textColor = .mainTextColor
return label
}()
......@@ -21,7 +21,7 @@ class YHResignDocumentContentCell: YHResignDocumentCell {
private lazy var infoDetailLabel: UILabel = {
let label = UILabel()
label.textColor = .mainTextColor50
label.font = .PFSC_R(ofSize:14)
label.font = .PFSC_R(ofSize: 14)
return label
}()
......
......@@ -13,7 +13,7 @@ class YHResignDocumentHeaderCell: YHResignDocumentCell {
private lazy var infoTitleLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_M(ofSize:17)
label.font = .PFSC_M(ofSize: 17)
label.textColor = .mainTextColor
return label
}()
......@@ -21,7 +21,7 @@ class YHResignDocumentHeaderCell: YHResignDocumentCell {
private lazy var infoDetailLabel: UILabel = {
let label = UILabel()
label.textColor = .mainTextColor50
label.font = .PFSC_R(ofSize:13)
label.font = .PFSC_R(ofSize: 13)
return label
}()
......
......@@ -26,7 +26,7 @@ class YHResignDocumentStatusCell: YHResignDocumentCell {
private lazy var infoTitleLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_M(ofSize:17)
label.font = .PFSC_M(ofSize: 17)
label.textColor = UIColor(hexString: "#222222")
label.text = "文书稿件"
return label
......@@ -34,7 +34,7 @@ class YHResignDocumentStatusCell: YHResignDocumentCell {
private lazy var infoStatusLabel: YHPaddedLabel = {
let label = YHPaddedLabel(padding: UIEdgeInsets(top: 0, left: 4, bottom: 0, right: 4))
label.font = .PFSC_M(ofSize:10)
label.font = .PFSC_M(ofSize: 10)
label.layer.cornerRadius = 2
label.layer.masksToBounds = true
return label
......@@ -59,7 +59,7 @@ class YHResignDocumentStatusCell: YHResignDocumentCell {
private lazy var fileNameLabel: UILabel = {
let label = UILabel()
label.textColor = UIColor(hexString: "#222222")
label.font = .PFSC_M(ofSize:14)
label.font = .PFSC_M(ofSize: 14)
label.numberOfLines = 0
return label
}()
......@@ -79,7 +79,7 @@ class YHResignDocumentStatusCell: YHResignDocumentCell {
let button = UIButton(type: .custom)
button.isHidden = true
button.setTitleColor(UIColor.brandMainColor, for: .normal)
button.titleLabel?.font = .PFSC_R(ofSize:14)
button.titleLabel?.font = .PFSC_R(ofSize: 14)
button.addTarget(self, action: #selector(leftButtonDidClick(_:)), for: .touchUpInside)
return button
}()
......@@ -88,7 +88,7 @@ class YHResignDocumentStatusCell: YHResignDocumentCell {
let button = UIButton(type: .custom)
button.isHidden = true
button.setTitleColor(UIColor.brandMainColor, for: .normal)
button.titleLabel?.font = .PFSC_R(ofSize:14)
button.titleLabel?.font = .PFSC_R(ofSize: 14)
button.addTarget(self, action: #selector(midButtonDidClick(_:)), for: .touchUpInside)
return button
}()
......@@ -97,7 +97,7 @@ class YHResignDocumentStatusCell: YHResignDocumentCell {
let button = UIButton(type: .custom)
button.isHidden = true
button.setTitleColor(UIColor.brandMainColor, for: .normal)
button.titleLabel?.font = .PFSC_R(ofSize:14)
button.titleLabel?.font = .PFSC_R(ofSize: 14)
button.addTarget(self, action: #selector(rightButtonDidClick(_:)), for: .touchUpInside)
return button
}()
......
......@@ -26,7 +26,7 @@ class YHResignDocumentTipsCell: YHResignDocumentCell {
private lazy var infoTitleLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_M(ofSize:13)
label.font = .PFSC_M(ofSize: 13)
label.textColor = .brandMainColor
label.text = "填写指引"
return label
......@@ -35,7 +35,7 @@ class YHResignDocumentTipsCell: YHResignDocumentCell {
private lazy var infoDetailLabel: UILabel = {
let label = UILabel()
label.textColor = .mainTextColor50
label.font = .PFSC_R(ofSize:12)
label.font = .PFSC_R(ofSize: 12)
label.numberOfLines = 0
return label
}()
......
......@@ -100,3 +100,19 @@ extension NSMutableAttributedString {
}
}
extension NSAttributedString {
func yh_height(containerWidth: CGFloat) -> CGFloat {
let rect = boundingRect(with: CGSize(width: containerWidth, height: CGFloat.greatestFiniteMagnitude),
options: [.usesLineFragmentOrigin, .usesFontLeading],
context: nil)
return ceil(rect.size.height)
}
func yh_width(containerHeight: CGFloat) -> CGFloat {
let rect = boundingRect(with: CGSize(width: CGFloat.greatestFiniteMagnitude, height: containerHeight),
options: [.usesLineFragmentOrigin, .usesFontLeading],
context: nil)
return ceil(rect.size.width)
}
}
......@@ -90,4 +90,24 @@ extension UIView {
return layer
}
@discardableResult
public func createRoundedCornersAndBorder(corners: UIRectCorner, radii: CGSize, lineWidth: CGFloat?, lineColor: CGColor?) -> [CAShapeLayer] {
var shapeLayers: [CAShapeLayer] = []
let path = UIBezierPath(roundedRect: bounds, byRoundingCorners: corners, cornerRadii: radii)
let shape = CAShapeLayer()
shape.path = path.cgPath
layer.mask = shape
shapeLayers.append(shape)
if let lineWidth = lineWidth, let lineColor = lineColor {
let bordLayer = CAShapeLayer()
bordLayer.lineWidth = lineWidth
bordLayer.strokeColor = lineColor
bordLayer.fillColor = UIColor.clear.cgColor
bordLayer.path = path.cgPath
layer.insertSublayer(bordLayer, at: 0)
shapeLayers.append(bordLayer)
}
return shapeLayers
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "asterisk_icon_6@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "asterisk_icon_6@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "personnel_selected_badge@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "personnel_selected_badge@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "right_arrow_black_20@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "right_arrow_black_20@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