Commit eee49ba7 authored by David黄金龙's avatar David黄金龙

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

* 'develop' of http://gitlab.galaxy-immi.com/mobile-group/galaxy-iOS:
  //  搜索栏
  //  搜索bar
  // 资料上传
parents ed4d4524 2aee0be2
......@@ -110,7 +110,7 @@
045EEEDC2B9F171A0022A143 /* YHQualificationDetailVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 045EEE132B9F171A0022A143 /* YHQualificationDetailVC.swift */; };
045EEEDD2B9F171A0022A143 /* YHCollegeNameCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 045EEE152B9F171A0022A143 /* YHCollegeNameCell.swift */; };
045EEEDE2B9F171A0022A143 /* YHEducationInfoCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 045EEE162B9F171A0022A143 /* YHEducationInfoCell.swift */; };
045EEEDF2B9F171A0022A143 /* YHSearchBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 045EEE172B9F171A0022A143 /* YHSearchBar.swift */; };
045EEEDF2B9F171A0022A143 /* YHCollegeSearchBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 045EEE172B9F171A0022A143 /* YHCollegeSearchBar.swift */; };
045EEEE12B9F171A0022A143 /* YHMySignatureListViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 045EEE1D2B9F171A0022A143 /* YHMySignatureListViewModel.swift */; };
045EEEE22B9F171A0022A143 /* YHMySignatureDetailViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 045EEE1E2B9F171A0022A143 /* YHMySignatureDetailViewModel.swift */; };
045EEEE32B9F171A0022A143 /* YHMySignatureListModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 045EEE202B9F171A0022A143 /* YHMySignatureListModel.swift */; };
......@@ -196,11 +196,14 @@
04754A952B96FF3D00F8ADCA /* UITextField+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04754A942B96FF3D00F8ADCA /* UITextField+Extension.swift */; };
04808C062B4686510056D53C /* ATAuthSDK.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 04808C042B4686510056D53C /* ATAuthSDK.bundle */; };
04808C082B4686C10056D53C /* ATAuthSDK_D.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 04808C032B4686510056D53C /* ATAuthSDK_D.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
0480976B2BA15269000B9DCA /* YHCertificateInfoCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0480976A2BA15269000B9DCA /* YHCertificateInfoCell.swift */; };
0480976D2BA158A1000B9DCA /* YHCertificateResourceUploadVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0480976C2BA158A1000B9DCA /* YHCertificateResourceUploadVC.swift */; };
048097712BA18D66000B9DCA /* YHCertificateSearchBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 048097702BA18D66000B9DCA /* YHCertificateSearchBar.swift */; };
049A48A82B49417300D0C641 /* YHAboutUsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 049A48A72B49417300D0C641 /* YHAboutUsViewController.swift */; };
049A48AA2B49536000D0C641 /* YHAboutUsAdvantageCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 049A48A92B49536000D0C641 /* YHAboutUsAdvantageCell.swift */; };
04A671592B9F18C800C1FB91 /* YHCertificateUploadSheetView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04A671582B9F18C800C1FB91 /* YHCertificateUploadSheetView.swift */; };
04A6715C2B9FE9EA00C1FB91 /* YHUploadContentVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04A6715B2B9FE9EA00C1FB91 /* YHUploadContentVC.swift */; };
04A6715E2B9FFCA700C1FB91 /* YHCertificateInfoCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04A6715D2B9FFCA700C1FB91 /* YHCertificateInfoCell.swift */; };
04A6715E2B9FFCA700C1FB91 /* YHCertificateNameCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04A6715D2B9FFCA700C1FB91 /* YHCertificateNameCell.swift */; };
04A671602BA0280800C1FB91 /* YHFileRenameInputView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04A6715F2BA0280800C1FB91 /* YHFileRenameInputView.swift */; };
04A671622BA058DE00C1FB91 /* YHCertificateEditSheetView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04A671612BA058DE00C1FB91 /* YHCertificateEditSheetView.swift */; };
04A7BC912B6B7B89000E8D47 /* YHTwoOptionAlertView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04A7BC902B6B7B89000E8D47 /* YHTwoOptionAlertView.swift */; };
......@@ -445,7 +448,7 @@
045EEE132B9F171A0022A143 /* YHQualificationDetailVC.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHQualificationDetailVC.swift; sourceTree = "<group>"; };
045EEE152B9F171A0022A143 /* YHCollegeNameCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHCollegeNameCell.swift; sourceTree = "<group>"; };
045EEE162B9F171A0022A143 /* YHEducationInfoCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHEducationInfoCell.swift; sourceTree = "<group>"; };
045EEE172B9F171A0022A143 /* YHSearchBar.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHSearchBar.swift; sourceTree = "<group>"; };
045EEE172B9F171A0022A143 /* YHCollegeSearchBar.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHCollegeSearchBar.swift; sourceTree = "<group>"; };
045EEE1D2B9F171A0022A143 /* YHMySignatureListViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHMySignatureListViewModel.swift; sourceTree = "<group>"; };
045EEE1E2B9F171A0022A143 /* YHMySignatureDetailViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHMySignatureDetailViewModel.swift; sourceTree = "<group>"; };
045EEE202B9F171A0022A143 /* YHMySignatureListModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHMySignatureListModel.swift; sourceTree = "<group>"; };
......@@ -531,11 +534,14 @@
04754A942B96FF3D00F8ADCA /* UITextField+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UITextField+Extension.swift"; sourceTree = "<group>"; };
04808C032B4686510056D53C /* ATAuthSDK_D.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = ATAuthSDK_D.framework; sourceTree = "<group>"; };
04808C042B4686510056D53C /* ATAuthSDK.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = ATAuthSDK.bundle; sourceTree = "<group>"; };
0480976A2BA15269000B9DCA /* YHCertificateInfoCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateInfoCell.swift; sourceTree = "<group>"; };
0480976C2BA158A1000B9DCA /* YHCertificateResourceUploadVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateResourceUploadVC.swift; sourceTree = "<group>"; };
048097702BA18D66000B9DCA /* YHCertificateSearchBar.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateSearchBar.swift; sourceTree = "<group>"; };
049A48A72B49417300D0C641 /* YHAboutUsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAboutUsViewController.swift; sourceTree = "<group>"; };
049A48A92B49536000D0C641 /* YHAboutUsAdvantageCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAboutUsAdvantageCell.swift; sourceTree = "<group>"; };
04A671582B9F18C800C1FB91 /* YHCertificateUploadSheetView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHCertificateUploadSheetView.swift; sourceTree = "<group>"; };
04A6715B2B9FE9EA00C1FB91 /* YHUploadContentVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHUploadContentVC.swift; sourceTree = "<group>"; };
04A6715D2B9FFCA700C1FB91 /* YHCertificateInfoCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateInfoCell.swift; sourceTree = "<group>"; };
04A6715D2B9FFCA700C1FB91 /* YHCertificateNameCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateNameCell.swift; sourceTree = "<group>"; };
04A6715F2BA0280800C1FB91 /* YHFileRenameInputView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHFileRenameInputView.swift; sourceTree = "<group>"; };
04A671612BA058DE00C1FB91 /* YHCertificateEditSheetView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateEditSheetView.swift; sourceTree = "<group>"; };
04A7BC902B6B7B89000E8D47 /* YHTwoOptionAlertView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHTwoOptionAlertView.swift; sourceTree = "<group>"; };
......@@ -1000,7 +1006,7 @@
children = (
045EEE152B9F171A0022A143 /* YHCollegeNameCell.swift */,
045EEE162B9F171A0022A143 /* YHEducationInfoCell.swift */,
045EEE172B9F171A0022A143 /* YHSearchBar.swift */,
045EEE172B9F171A0022A143 /* YHCollegeSearchBar.swift */,
);
path = V;
sourceTree = "<group>";
......@@ -1325,8 +1331,10 @@
children = (
04A671582B9F18C800C1FB91 /* YHCertificateUploadSheetView.swift */,
04A671612BA058DE00C1FB91 /* YHCertificateEditSheetView.swift */,
048097702BA18D66000B9DCA /* YHCertificateSearchBar.swift */,
04A6715F2BA0280800C1FB91 /* YHFileRenameInputView.swift */,
04A6715D2B9FFCA700C1FB91 /* YHCertificateInfoCell.swift */,
04A6715D2B9FFCA700C1FB91 /* YHCertificateNameCell.swift */,
0480976A2BA15269000B9DCA /* YHCertificateInfoCell.swift */,
);
path = V;
sourceTree = "<group>";
......@@ -1335,6 +1343,7 @@
isa = PBXGroup;
children = (
04A6715B2B9FE9EA00C1FB91 /* YHUploadContentVC.swift */,
0480976C2BA158A1000B9DCA /* YHCertificateResourceUploadVC.swift */,
);
path = C;
sourceTree = "<group>";
......@@ -2056,7 +2065,7 @@
A5C382CA2B5E1F4C00C5E65C /* YHLoginTipsView.swift in Sources */,
045EEEE92B9F171A0022A143 /* YHFamilyRequestViewModel.swift in Sources */,
A5C5B3232B57BF8F00A7C5D1 /* YHDavidCell1.swift in Sources */,
045EEEDF2B9F171A0022A143 /* YHSearchBar.swift in Sources */,
045EEEDF2B9F171A0022A143 /* YHCollegeSearchBar.swift in Sources */,
A5C5B2FB2B5535DF00A7C5D1 /* YHHomeBannerView.swift in Sources */,
A5ACE94B2B4564F7002C94D2 /* YHHUDRotatingImageView.swift in Sources */,
A5ACE94F2B4564F7002C94D2 /* YhOverlayView.swift in Sources */,
......@@ -2128,6 +2137,7 @@
045EEEF72B9F171A0022A143 /* YHFormItemAddCell.swift in Sources */,
045EEEC82B9F171A0022A143 /* YHOtherSelecteItemView.swift in Sources */,
A5C5B3122B57B47D00A7C5D1 /* YHDavidCell0.swift in Sources */,
0480976B2BA15269000B9DCA /* YHCertificateInfoCell.swift in Sources */,
A56D2D612B62020C009C83A8 /* YHContractMainItemStatusCell.swift in Sources */,
045EEECF2B9F171A0022A143 /* YHScoreOptionsView.swift in Sources */,
045EEEC12B9F171A0022A143 /* YHOtherInfoFillModel.swift in Sources */,
......@@ -2148,7 +2158,7 @@
045EEF0F2B9F171A0022A143 /* YHSelectCountryViewModel.swift in Sources */,
045EEEB52B9F171A0022A143 /* YHWorkIntroductionItemView.swift in Sources */,
045EEF202B9F171A0022A143 /* YHCardExampleView.swift in Sources */,
04A6715E2B9FFCA700C1FB91 /* YHCertificateInfoCell.swift in Sources */,
04A6715E2B9FFCA700C1FB91 /* YHCertificateNameCell.swift in Sources */,
045EEE8E2B9F171A0022A143 /* YHPreviewInfoWorkSummaryView.swift in Sources */,
045EEECE2B9F171A0022A143 /* YHScoreDetailViewController.swift in Sources */,
A5C5B3252B57C74900A7C5D1 /* YHDavidCell3.swift in Sources */,
......@@ -2193,6 +2203,7 @@
045EEEFE2B9F171A0022A143 /* YHFormItemInputTextCell.swift in Sources */,
045EEEDD2B9F171A0022A143 /* YHCollegeNameCell.swift in Sources */,
045EEF162B9F171A0022A143 /* YHMainApplicantInformationViewController.swift in Sources */,
048097712BA18D66000B9DCA /* YHCertificateSearchBar.swift in Sources */,
045EEEAA2B9F171A0022A143 /* YHWorkExampleViewController.swift in Sources */,
A5FD63C12B62616D00D1D9DA /* YHInformationPerfectModel.swift in Sources */,
045EEE912B9F171A0022A143 /* YHPreviewInfoCertificatePictureItemView.swift in Sources */,
......@@ -2203,6 +2214,7 @@
045EEEAD2B9F171A0022A143 /* YHWorkExperienceListTableViewCell.swift in Sources */,
049A48A82B49417300D0C641 /* YHAboutUsViewController.swift in Sources */,
045EEEF82B9F171A0022A143 /* YHFormItemOnlyDoubleChoiceCell.swift in Sources */,
0480976D2BA158A1000B9DCA /* YHCertificateResourceUploadVC.swift in Sources */,
045EEE8B2B9F171A0022A143 /* YHPreviewMainApplicantInfoViewController.swift in Sources */,
045EEE922B9F171A0022A143 /* YHPreviewInfoNameAndSubNameItemView.swift in Sources */,
045EEEF92B9F171A0022A143 /* YHFormItemTitleCell.swift in Sources */,
......
......@@ -17,8 +17,8 @@ class YHCollegeSearchViewController: YHBaseViewController {
var lastSearchTime:TimeInterval = 0.0
let educationRequest:YHEducationRequestViewModel = YHEducationRequestViewModel()
lazy var searchBar: YHSearchBar = {
let bar = YHSearchBar.createBar()
lazy var searchBar: YHCollegeSearchBar = {
let bar = YHCollegeSearchBar.createBar()
return bar
}()
......@@ -108,7 +108,7 @@ class YHCollegeSearchViewController: YHBaseViewController {
searchBar.snp.makeConstraints { make in
make.left.equalToSuperview().offset(16)
make.right.equalToSuperview().offset(-16)
make.height.equalTo(YHSearchBar.height)
make.height.equalTo(YHCollegeSearchBar.height)
make.top.equalToSuperview().offset(k_Height_NavigationtBarAndStatuBar+16)
}
......
//
// YHSearchBar.swift
// YHCollegeSearchBar.swift
// galaxy
//
// Created by edy on 2024/2/22.
......@@ -8,7 +8,7 @@
import UIKit
class YHSearchBar: UIView {
class YHCollegeSearchBar: UIView {
static let height = 40.0
static let confirmBtnHeight = height-8.0
......@@ -61,8 +61,8 @@ class YHSearchBar: UIView {
super.init(coder: coder)
}
static func createBar() -> YHSearchBar {
let view = YHSearchBar(frame: CGRect(x: 0, y: 0, width: KScreenWidth-32, height: height))
static func createBar() -> YHCollegeSearchBar {
let view = YHCollegeSearchBar(frame: CGRect(x: 0, y: 0, width: KScreenWidth-32, height: height))
return view
}
......
//
// YHCertificateResourceUploadVC.swift
// galaxy
//
// Created by edy on 2024/3/13.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHCertificateResourceUploadVC: YHBaseViewController {
var items:[String] = ["1", "2", "2", "2", "2", "2", "2", "2"]
lazy var tableView: UITableView = {
let tableView = UITableView(frame:.zero, style:.grouped)
if #available(iOS 11.0, *) {
tableView.contentInsetAdjustmentBehavior = .never
}
tableView.estimatedSectionHeaderHeight = 14.0
tableView.estimatedSectionFooterHeight = 1.0
tableView.showsVerticalScrollIndicator = false
tableView.separatorStyle = .none
tableView.delegate = self
tableView.dataSource = self
tableView.backgroundColor = UIColor(hexString:"#F8F8F8")
tableView.register(UITableViewCell.self, forCellReuseIdentifier: "UITableViewCell")
tableView.register(YHCertificateInfoCell.self, forCellReuseIdentifier: YHCertificateInfoCell.cellReuseIdentifier)
return tableView
}()
lazy var searchView:UIView = {
let view = UIView()
view.backgroundColor = .white
view.addSubview(searchBar)
searchBar.snp.makeConstraints { make in
make.centerY.equalToSuperview()
make.left.equalToSuperview().offset(16)
make.size.equalTo(CGSize(width: KScreenWidth-32.0, height:YHCertificateSearchBar.height))
}
return view
}()
lazy var searchBar: YHCertificateSearchBar = {
let bar = YHCertificateSearchBar(frame:CGRect(x: 0, y: 0, width:KScreenWidth-32, height:YHCertificateSearchBar.height))
return bar
}()
override func viewDidLoad() {
super.viewDidLoad()
self.view.backgroundColor = .white
self.gk_navTitle = "资料上传"
self.gk_navigationBar.backgroundColor = .white
createUI()
}
func createUI() {
view.addSubview(tableView)
view.addSubview(searchView)
tableView.snp.makeConstraints { make in
make.top.equalTo(k_Height_NavigationtBarAndStatuBar)
make.left.right.equalTo(view)
make.bottom.equalToSuperview().offset(-k_Height_safeAreaInsetsBottom())
}
searchView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.top.equalToSuperview().offset(k_Height_NavigationtBarAndStatuBar)
make.height.equalTo(YHCertificateSearchBar.height+32)
}
}
}
extension YHCertificateResourceUploadVC: UITableViewDelegate, UITableViewDataSource {
func numberOfSections(in tableView: UITableView) -> Int {
return items.count
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 1
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let item = items[indexPath.section]
let cell = tableView.dequeueReusableCell(withIdentifier: YHCertificateInfoCell.cellReuseIdentifier, for: indexPath)
return cell
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return UITableView.automaticDimension
}
private func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> CGFloat {
return 14.0
}
private func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> CGFloat {
return 1.0
}
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
return UIView()
}
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
return UIView()
}
}
......@@ -2,21 +2,33 @@
// YHCertificateInfoCell.swift
// galaxy
//
// Created by edy on 2024/3/12.
// Created by edy on 2024/3/13.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import AttributedString
class YHCertificateInfoCell: UITableViewCell {
static let cellReuseIdentifier = "YHCertificateInfoCell"
static let cellReuseIdentifier = "YHCertificateNameCell"
var whiteView: UIView!
var iconImgV: UIImageView!
var nameLabel: UILabel!
var timeLabel: UILabel!
var editBtn: UIButton!
var nameTextView: UITextView!
var infoLabel: UILabel!
var statusBtn: UIButton!
private lazy var templateLabel : UILabel = {
let customLabel = UILabel(frame: CGRect(x: 0, y: 0, width: 48, height: 16))
customLabel.text = "资料模版"
customLabel.font = .PFSC_M(ofSize: 10)
customLabel.backgroundColor = .brandMainColor8
customLabel.textColor = .brandMainColor
customLabel.layer.cornerRadius = 3
customLabel.clipsToBounds = true
customLabel.textAlignment = .center
return customLabel
}()
required init?(coder: NSCoder) {
......@@ -31,62 +43,71 @@ class YHCertificateInfoCell: UITableViewCell {
func setupUI() {
self.selectionStyle = .none
contentView.backgroundColor = .white
contentView.backgroundColor = UIColor(hexString:"#F8F8F8")
whiteView = UIView()
whiteView.layer.cornerRadius = 6.0
whiteView.clipsToBounds = true
whiteView.backgroundColor = .white
contentView.addSubview(whiteView)
iconImgV = UIImageView(image:UIImage(named:"my_cer_type_pdf"))
whiteView.addSubview(iconImgV)
nameTextView = UITextView()
nameTextView.textColor = UIColor.mainTextColor
nameTextView.font = UIFont.PFSC_M(ofSize: 16)
nameTextView.isScrollEnabled = false
nameTextView.isEditable = false
nameTextView.isSelectable = false
whiteView.addSubview(nameTextView)
nameLabel = UILabel()
nameLabel.textColor = UIColor.mainTextColor
nameLabel.textAlignment = .left
nameLabel.font = UIFont.PFSC_M(ofSize:14)
nameLabel.text = "文档名称.doc"
whiteView.addSubview(nameLabel)
nameTextView.attributed.text = """
\("我是资料名称", .foreground(UIColor.mainTextColor), .font(UIFont.PFSC_M(ofSize: 16))) \(.view(templateLabel, .original(.center)))
"""
timeLabel = UILabel()
timeLabel.textColor = UIColor.labelTextColor2
timeLabel.textAlignment = .left
timeLabel.font = UIFont.PFSC_R(ofSize:11)
timeLabel.text = "上传于2024.01.01"
whiteView.addSubview(timeLabel)
infoLabel = UILabel()
infoLabel.textColor = UIColor.labelTextColor2
infoLabel.textAlignment = .left
infoLabel.font = UIFont.PFSC_R(ofSize:11)
infoLabel.text = "类型:证件资料 所属人:张康"
whiteView.addSubview(infoLabel)
statusBtn = UIButton()
statusBtn.titleLabel?.font = UIFont.PFSC_R(ofSize:14)
let iconWidth = 16.0
let titleWidth = 42.0
statusBtn.titleEdgeInsets = UIEdgeInsets(top: 0, left: -iconWidth, bottom: 0, right: iconWidth)
statusBtn.imageEdgeInsets = UIEdgeInsets(top: 0, left: titleWidth, bottom: 0, right: -titleWidth)
statusBtn.setImage(UIImage(named:"my_cer_arrow_right"), for:.normal)
statusBtn.setTitle("待上传", for:.normal)
statusBtn.setTitleColor(.blue, for:.normal)
whiteView.addSubview(statusBtn)
editBtn = UIButton()
editBtn.setImage(UIImage(named:"my_cer_btn_edit"), for:.normal)
whiteView.addSubview(editBtn)
whiteView.snp.makeConstraints { make in
make.left.equalToSuperview().offset(20)
make.right.equalToSuperview().offset(-20)
make.height.equalTo(55)
make.top.equalToSuperview().offset(15)
}
iconImgV.snp.makeConstraints { make in
make.width.height.equalTo(31)
make.centerY.equalToSuperview()
make.left.equalToSuperview().offset(6)
make.top.bottom.equalToSuperview()
}
nameLabel.snp.makeConstraints { make in
make.left.equalTo(iconImgV.snp.right).offset(18)
make.height.equalTo(20)
make.bottom.equalTo(whiteView.snp.centerY).offset(-1)
make.right.equalTo(editBtn.snp.left)
nameTextView.snp.makeConstraints { make in
make.left.equalToSuperview().offset(10)
make.top.equalToSuperview().offset(4)
make.right.equalTo(statusBtn.snp.left)
}
timeLabel.snp.makeConstraints { make in
make.left.right.equalTo(nameLabel)
make.top.equalTo(whiteView.snp.centerY).offset(1)
infoLabel.snp.makeConstraints { make in
make.left.equalToSuperview().offset(16)
make.right.equalTo(nameTextView)
make.top.equalTo(nameTextView.snp.bottom)
make.bottom.equalToSuperview().offset(-12)
make.height.equalTo(20)
}
editBtn.snp.makeConstraints { make in
make.width.height.equalTo(16)
statusBtn.snp.makeConstraints { make in
make.height.equalTo(60)
make.width.equalTo(92)
make.centerY.equalToSuperview()
make.right.equalToSuperview().offset(-6)
make.right.equalToSuperview()
}
}
}
//
// YHCertificateInfoCell.swift
// galaxy
//
// Created by edy on 2024/3/12.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHCertificateNameCell: UITableViewCell {
static let cellReuseIdentifier = "YHCertificateNameCell"
var whiteView: UIView!
var iconImgV: UIImageView!
var nameLabel: UILabel!
var timeLabel: UILabel!
var editBtn: UIButton!
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
contentView.backgroundColor = .white
whiteView = UIView()
contentView.addSubview(whiteView)
iconImgV = UIImageView(image:UIImage(named:"my_cer_type_pdf"))
whiteView.addSubview(iconImgV)
nameLabel = UILabel()
nameLabel.textColor = UIColor.mainTextColor
nameLabel.textAlignment = .left
nameLabel.font = UIFont.PFSC_M(ofSize:14)
nameLabel.text = "文档名称.doc"
whiteView.addSubview(nameLabel)
timeLabel = UILabel()
timeLabel.textColor = UIColor.labelTextColor2
timeLabel.textAlignment = .left
timeLabel.font = UIFont.PFSC_R(ofSize:11)
timeLabel.text = "上传于2024.01.01"
whiteView.addSubview(timeLabel)
editBtn = UIButton()
editBtn.setImage(UIImage(named:"my_cer_btn_edit"), for:.normal)
whiteView.addSubview(editBtn)
whiteView.snp.makeConstraints { make in
make.left.equalToSuperview().offset(20)
make.right.equalToSuperview().offset(-20)
make.height.equalTo(55)
make.top.equalToSuperview().offset(15)
}
iconImgV.snp.makeConstraints { make in
make.width.height.equalTo(31)
make.centerY.equalToSuperview()
make.left.equalToSuperview().offset(6)
}
nameLabel.snp.makeConstraints { make in
make.left.equalTo(iconImgV.snp.right).offset(18)
make.height.equalTo(20)
make.bottom.equalTo(whiteView.snp.centerY).offset(-1)
make.right.equalTo(editBtn.snp.left)
}
timeLabel.snp.makeConstraints { make in
make.left.right.equalTo(nameLabel)
make.top.equalTo(whiteView.snp.centerY).offset(1)
make.height.equalTo(20)
}
editBtn.snp.makeConstraints { make in
make.width.height.equalTo(16)
make.centerY.equalToSuperview()
make.right.equalToSuperview().offset(-6)
}
}
}
//
// YHCertificateSearchBar.swift
// galaxy
//
// Created by edy on 2024/3/13.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHCertificateSearchBar: UIView {
static let height = 40.0
static let cancelBtnHeight = height-8.0
var textChange:((String?)->Void)?
var cancelBlock:(()->Void)?
var placeHolder:String? {
didSet {
if let placeholder = placeHolder {
textField.attributedPlaceholder = NSAttributedString(string: placeholder, attributes: [NSAttributedString.Key.foregroundColor : UIColor.placeHolderColor])
}
}
}
private lazy var contentView = {
let view = UIView()
view.backgroundColor = .contentBkgColor
view.layer.cornerRadius = Self.height/2.0
view.clipsToBounds = true
return view
}()
lazy var textField:UITextField = {
let textField = UITextField()
textField.backgroundColor = .clear
textField.attributedPlaceholder = NSAttributedString(string: "请输入", attributes: [NSAttributedString.Key.foregroundColor : UIColor.placeHolderColor])
textField.font = UIFont.PFSC_M(ofSize: 12)
textField.tintColor = UIColor(hexString: "#3D88F8")
textField.textColor = UIColor.mainTextColor
textField.clearButtonMode = .whileEditing
textField.addTarget(self, action: #selector(textFieldChanged(textField:)), for: .editingChanged)
return textField
}()
lazy var cancelBtn: UIButton = {
let btn = UIButton()
btn.setTitle("取消".local, for: .normal)
btn.titleLabel?.font = UIFont.PFSC_M(ofSize: 12)
btn.setTitleColor(.white, for: .normal)
btn.backgroundColor = UIColor(hexString: "#3D88F8")
btn.layer.cornerRadius = Self.cancelBtnHeight/2.0
btn.addTarget(self, action: #selector(cancelBtnClicked), for: .touchUpInside)
return btn
}()
override init(frame: CGRect) {
super.init(frame: frame)
self.createUI()
}
required init?(coder: NSCoder) {
super.init(coder: coder)
}
static func createBar() -> YHCertificateSearchBar {
let view = YHCertificateSearchBar(frame: CGRect(x: 0, y: 0, width: KScreenWidth-32, height: height))
return view
}
@objc func cancelBtnClicked() {
if let cancelBlock = cancelBlock {
cancelBlock()
}
}
func createUI() {
self.backgroundColor = .white
contentView.addSubview(textField)
contentView.addSubview(cancelBtn)
self.addSubview(contentView)
contentView.snp.makeConstraints { make in
make.edges.equalToSuperview()
}
textField.snp.makeConstraints { make in
make.left.equalToSuperview().offset(Self.height/2.0)
make.right.equalTo(cancelBtn.snp.left).offset(-4)
make.centerY.equalToSuperview()
}
cancelBtn.snp.makeConstraints { make in
make.size.equalTo(CGSize(width: 66, height: Self.height-8.0))
make.centerY.equalToSuperview()
make.right.equalToSuperview().offset(-4)
}
}
@objc func textFieldChanged(textField:UITextField) {
if let textChange = textChange {
textChange(textField.text)
}
}
}
......@@ -70,8 +70,6 @@ class YHFileRenameInputView: UIView {
textField.font = UIFont.PFSC_M(ofSize: 16)
textField.tintColor = UIColor.brandMainColor
textField.textColor = UIColor.mainTextColor
// textField.addTarget(self, action: #selector(textFieldChanged(textField:)), for: .editingChanged)
// textField.addTarget(self, action: #selector(textFieldEditEnd(textField:)), for: .editingDidEnd)
return textField
}()
......
......@@ -21,7 +21,7 @@ extension UIColor {
static let brandMainColor16 : UIColor = UIColor(hexString: "#2F7EF6",transparency: 0.16)!
//品牌主色 8
static let brandMainColor8: UIColor = UIColor(hexString: "#2F7EF6",transparency: 0.16)!
static let brandMainColor8: UIColor = UIColor(hexString: "#2F7EF6",transparency: 0.08)!
//标题/主内容
static let mainTextColor : UIColor = UIColor(hexString: "#222222")!
......
{
"images" : [
{
"filename" : "icon-展开.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"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