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

个人信息表 UI 优化

parent 6c48e326
...@@ -22,7 +22,7 @@ class YHMainApplicantInfoViewController: YHPersonInfoBaseViewController { ...@@ -22,7 +22,7 @@ class YHMainApplicantInfoViewController: YHPersonInfoBaseViewController {
} }
private extension YHMainApplicantInfoViewController { private extension YHMainApplicantInfoViewController {
func fakeData() { func installData() {
do { do {
//国家信息 //国家信息
let tmp0 = YHPersonInfoBaseModel(name: "国家/国籍:", description: "中国-China") let tmp0 = YHPersonInfoBaseModel(name: "国家/国籍:", description: "中国-China")
...@@ -97,7 +97,8 @@ private extension YHMainApplicantInfoViewController { ...@@ -97,7 +97,8 @@ private extension YHMainApplicantInfoViewController {
} }
func setupUI() { func setupUI() {
fakeData() installData()
self.homeTableView.register(YHPersonInfoCommonCell.self,forCellReuseIdentifier: YHPersonInfoCommonCell.cellReuseIdentifier) self.homeTableView.register(YHPersonInfoCommonCell.self,forCellReuseIdentifier: YHPersonInfoCommonCell.cellReuseIdentifier)
self.homeTableView.reloadData() self.homeTableView.reloadData()
} }
......
...@@ -21,17 +21,17 @@ class YHPersonInfoControllerHoldViewController: UIViewController { ...@@ -21,17 +21,17 @@ class YHPersonInfoControllerHoldViewController: UIViewController {
let arrItemTitles = ["主申请人信息","家庭成员信息","基本资料","学历/专业资格","工作经验","其他信息"] let arrItemTitles = ["主申请人信息","家庭成员信息","基本资料","学历/专业资格","工作经验","其他信息"]
var arrItemVCs : [YHPersonInfoBaseViewController] = [] var arrItemVCs : [YHPersonInfoBaseViewController] = []
var segmentedView : JXSegmentedView = JXSegmentedView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: 58)) var segmentedView : JXSegmentedView = JXSegmentedView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: 55))
lazy var segmentedDataSource: JXSegmentedBaseDataSource = { lazy var segmentedDataSource: JXSegmentedBaseDataSource = {
let dataSource = JXSegmentedTitleDataSource() let dataSource = JXSegmentedTitleDataSource()
dataSource.isTitleColorGradientEnabled = true // dataSource.isTitleColorGradientEnabled = true
dataSource.titles = arrItemTitles dataSource.titles = arrItemTitles
dataSource.titleNormalFont = UIFont.PFSC_R(ofSize: 16) dataSource.titleNormalFont = UIFont.PFSC_R(ofSize: 16)
dataSource.titleSelectedColor = UIColor(hex: 0x888F98) dataSource.titleSelectedColor = UIColor.labelTextColor2
dataSource.titleSelectedFont = UIFont.PFSC_M(ofSize: 18) dataSource.titleSelectedFont = UIFont.PFSC_M(ofSize: 16)
dataSource.titleSelectedColor = UIColor(hex: 0x4388FF) dataSource.titleSelectedColor = UIColor.brandMainColor
dataSource.isItemSpacingAverageEnabled = false dataSource.isItemSpacingAverageEnabled = false
dataSource.itemWidth = JXSegmentedViewAutomaticDimension dataSource.itemWidth = JXSegmentedViewAutomaticDimension
...@@ -48,11 +48,6 @@ class YHPersonInfoControllerHoldViewController: UIViewController { ...@@ -48,11 +48,6 @@ class YHPersonInfoControllerHoldViewController: UIViewController {
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
// for _ in arrItemTitles {
// let vc = YHMainApplicantInfoViewController()
// arrItemVCs.append(vc)
// }
do { do {
let vc = YHMainApplicantInfoViewController() let vc = YHMainApplicantInfoViewController()
arrItemVCs.append(vc) arrItemVCs.append(vc)
...@@ -103,7 +98,8 @@ class YHPersonInfoControllerHoldViewController: UIViewController { ...@@ -103,7 +98,8 @@ class YHPersonInfoControllerHoldViewController: UIViewController {
indicator.indicatorWidth = 16 indicator.indicatorWidth = 16
indicator.indicatorHeight = 4 indicator.indicatorHeight = 4
indicator.indicatorCornerRadius = 2 indicator.indicatorCornerRadius = 2
indicator.indicatorColor = UIColor(hex:0x4388FF) indicator.verticalOffset = 4
indicator.indicatorColor = UIColor.brandMainColor
segmentedView.indicators = [indicator] segmentedView.indicators = [indicator]
} }
...@@ -124,8 +120,8 @@ class YHPersonInfoControllerHoldViewController: UIViewController { ...@@ -124,8 +120,8 @@ class YHPersonInfoControllerHoldViewController: UIViewController {
override func viewDidLayoutSubviews() { override func viewDidLayoutSubviews() {
super.viewDidLayoutSubviews() super.viewDidLayoutSubviews()
segmentedView.frame = CGRect(x: 0, y: 0, width: view.bounds.size.width, height: 58) segmentedView.frame = CGRect(x: 0, y: 0, width: view.bounds.size.width, height: 55)
listContainerView.frame = CGRect(x: 0, y: 58, width: view.bounds.size.width, height: view.bounds.size.height - 58) listContainerView.frame = CGRect(x: 0, y: 55, width: view.bounds.size.width, height: view.bounds.size.height - 55)
segmentedView.backgroundColor = .white segmentedView.backgroundColor = .white
......
...@@ -32,7 +32,7 @@ class YHPersonInformMainViewController: YHBaseViewController { ...@@ -32,7 +32,7 @@ class YHPersonInformMainViewController: YHBaseViewController {
var myHeadView : UIView = { var myHeadView : UIView = {
let view = UIView(frame: CGRect(x: 16, y: 0, width: KScreenWidth - 16 * 2, height: 128)) let view = UIView(frame: CGRect(x: kMargin, y: 0, width: KScreenWidth - kMargin * 2, height: 131))
return view return view
}() }()
...@@ -40,23 +40,27 @@ class YHPersonInformMainViewController: YHBaseViewController { ...@@ -40,23 +40,27 @@ class YHPersonInformMainViewController: YHBaseViewController {
//头像 //头像
private lazy var headImagV : UIImageView = { private lazy var headImagV : UIImageView = {
let imageV = UIImageView(image: UIImage(named: "score_header_default")) let imageV = UIImageView(image: UIImage(named: "score_header_default"))
imageV.contentMode = .scaleAspectFit imageV.contentMode = .scaleAspectFill
imageV.layer.cornerRadius = 26.5
imageV.clipsToBounds = true
imageV.layer.borderWidth = 2
imageV.layer.borderColor = UIColor.white.cgColor
return imageV return imageV
}() }()
//姓名 //姓名
private lazy var nameLable : UILabel = { private lazy var nameLable : UILabel = {
let lable0 = UILabel(text: "DavidHuang") let lable0 = UILabel(text: "DavidHuang")
lable0.textColor = UIColor(hex: 0x222222) lable0.textColor = UIColor.mainTextColor
lable0.font = UIFont.PFSC_M(ofSize: 16) lable0.font = UIFont.PFSC_M(ofSize: 19)
return lable0 return lable0
}() }()
//电话号码 //电话号码
private lazy var phoneLable : UILabel = { private lazy var phoneLable : UILabel = {
let lable0 = UILabel(text: "15818743775") let lable0 = UILabel(text: "15818743775")
lable0.textColor = UIColor(hex: 0x888F98) lable0.textColor = UIColor.labelTextColor2
lable0.font = UIFont.PFSC_R(ofSize: 12) lable0.font = UIFont.PFSC_R(ofSize: 14)
return lable0 return lable0
}() }()
...@@ -130,6 +134,7 @@ extension YHPersonInformMainViewController { ...@@ -130,6 +134,7 @@ extension YHPersonInformMainViewController {
gk_navBackgroundColor = .white gk_navBackgroundColor = .white
gk_navTitleColor = UIColor(hex:0x0F1214) gk_navTitleColor = UIColor(hex:0x0F1214)
gk_navBarAlpha = 1 gk_navBarAlpha = 1
gk_navTitleFont = UIFont.PFSC_B(ofSize: 17)
...@@ -146,13 +151,13 @@ extension YHPersonInformMainViewController { ...@@ -146,13 +151,13 @@ extension YHPersonInformMainViewController {
let headSubView = UIView() let headSubView = UIView()
headSubView.backgroundColor = .clear headSubView.backgroundColor = .clear
headSubView.layer.cornerRadius = 12 headSubView.layer.cornerRadius = kCornerRadius6
headSubView.clipsToBounds = true headSubView.clipsToBounds = true
myHeadView.addSubview(headSubView) myHeadView.addSubview(headSubView)
headSubView.snp.makeConstraints { make in headSubView.snp.makeConstraints { make in
make.top.equalTo(17) make.top.equalTo(17)
make.left.equalTo(16) make.left.equalTo(kMargin)
make.right.equalTo(-16) make.right.equalTo(-kMargin)
make.height.equalTo(105) make.height.equalTo(105)
} }
...@@ -168,16 +173,18 @@ extension YHPersonInformMainViewController { ...@@ -168,16 +173,18 @@ extension YHPersonInformMainViewController {
headSubView.addSubview(headImagV) headSubView.addSubview(headImagV)
headImagV.snp.makeConstraints { make in headImagV.snp.makeConstraints { make in
make.centerY.equalToSuperview() make.centerY.equalToSuperview()
make.left.equalTo(21) make.left.equalTo(20.5)
make.width.height.equalTo(42) make.width.height.equalTo(53)
} }
headSubView.addSubview(nameLable) headSubView.addSubview(nameLable)
nameLable.snp.makeConstraints { make in nameLable.snp.makeConstraints { make in
make.top.equalTo(headImagV.snp.top) make.top.equalTo(headImagV.snp.top)
make.left.equalTo(headImagV.snp.right).offset(12) make.left.equalTo(headImagV.snp.right).offset(12)
make.height.equalTo(24) make.height.equalTo(26.5)
make.right.equalTo(-12) make.right.equalTo(-kMargin)
} }
headSubView.addSubview(phoneLable) headSubView.addSubview(phoneLable)
...@@ -185,41 +192,23 @@ extension YHPersonInformMainViewController { ...@@ -185,41 +192,23 @@ extension YHPersonInformMainViewController {
make.top.equalTo(nameLable.snp.bottom) make.top.equalTo(nameLable.snp.bottom)
make.left.equalTo(headImagV.snp.right).offset(12) make.left.equalTo(headImagV.snp.right).offset(12)
make.height.equalTo(20) make.height.equalTo(20)
make.right.equalTo(-12) make.right.equalTo(-20.5)
} }
let iconImageV = UIImageView(image: UIImage(named: "person_info_head_icon"))
iconImageV.contentMode = .scaleAspectFill
headSubView.addSubview(iconImageV)
iconImageV.snp.makeConstraints { make in
make.top.bottom.right.equalToSuperview()
make.width.equalTo(125)
} }
// private func loadFirstItem() {
// self.homeTableView.es.addPullToRefresh { // DispatchQueue.main.asyncAfter(deadline: .now() + 1) {
// self.loadFirstItem() // self.homeTableView.es.stopPullToRefresh(ignoreDate: true,ignoreFooter: false)
// self.homeTableView.reloadData()
// }
// }
//
// private func loadFakeData() {
// DispatchQueue.main.asyncAfter(deadline: .now() + 1) {
// self.homeTableView.es.stopLoadingMore()
// self.homeTableView.reloadData()
// } // }
// self.homeTableView.es.startPullToRefresh()
// self.homeTableView.es.addInfiniteScrolling {
// self.loadFakeData()
// } // }
}
private func loadFirstItem() {
DispatchQueue.main.asyncAfter(deadline: .now() + 1) {
self.homeTableView.es.stopPullToRefresh(ignoreDate: true,ignoreFooter: false)
self.homeTableView.reloadData()
}
}
private func loadFakeData() {
DispatchQueue.main.asyncAfter(deadline: .now() + 1) {
self.homeTableView.es.stopLoadingMore()
self.homeTableView.reloadData()
}
}
} }
// MARK: - UITableViewDelegate 和 UITableViewDataSource // MARK: - UITableViewDelegate 和 UITableViewDataSource
......
...@@ -20,7 +20,7 @@ class YHPersonInfoCellView: UIView { ...@@ -20,7 +20,7 @@ class YHPersonInfoCellView: UIView {
//title //title
private lazy var nameLable : UILabel = { private lazy var nameLable : UILabel = {
let lable0 = UILabel(text: "--") let lable0 = UILabel(text: "--")
lable0.textColor = UIColor(hex: 0x888F98) lable0.textColor = UIColor.labelTextColor2
lable0.font = UIFont.PFSC_R(ofSize: 14) lable0.font = UIFont.PFSC_R(ofSize: 14)
lable0.numberOfLines = 0 lable0.numberOfLines = 0
lable0.lineBreakMode = .byCharWrapping lable0.lineBreakMode = .byCharWrapping
...@@ -31,7 +31,7 @@ class YHPersonInfoCellView: UIView { ...@@ -31,7 +31,7 @@ class YHPersonInfoCellView: UIView {
//title //title
private lazy var subtitleLable : UILabel = { private lazy var subtitleLable : UILabel = {
let lable0 = UILabel(text: "--") let lable0 = UILabel(text: "--")
lable0.textColor = UIColor(hex: 0x222222) lable0.textColor = UIColor.mainTextColor
lable0.font = UIFont.PFSC_R(ofSize: 14) lable0.font = UIFont.PFSC_R(ofSize: 14)
lable0.numberOfLines = 0 lable0.numberOfLines = 0
lable0.lineBreakMode = .byWordWrapping lable0.lineBreakMode = .byWordWrapping
......
...@@ -30,7 +30,7 @@ class YHPersonInfoCommonCell: UITableViewCell { ...@@ -30,7 +30,7 @@ class YHPersonInfoCommonCell: UITableViewCell {
} }
private lazy var holdView : UIView = { private lazy var holdView : YHPersonInfoSessionHoldView = {
let contryInfoView = YHPersonInfoSessionHoldView() let contryInfoView = YHPersonInfoSessionHoldView()
return contryInfoView return contryInfoView
}() }()
......
...@@ -27,7 +27,7 @@ class YHPersonInfoIdentificationCardView: UIView { ...@@ -27,7 +27,7 @@ class YHPersonInfoIdentificationCardView: UIView {
private lazy var titleLable : UILabel = { private lazy var titleLable : UILabel = {
let lable = UILabel() let lable = UILabel()
lable.textColor = UIColor(hex: 0x222222) lable.textColor = UIColor.mainTextColor
lable.font = UIFont.PFSC_M(ofSize: 14) lable.font = UIFont.PFSC_M(ofSize: 14)
return lable return lable
}() }()
...@@ -55,7 +55,7 @@ class YHPersonInfoIdentificationCardView: UIView { ...@@ -55,7 +55,7 @@ class YHPersonInfoIdentificationCardView: UIView {
private lazy var subtitleFrontLable : UILabel = { private lazy var subtitleFrontLable : UILabel = {
let lable = UILabel() let lable = UILabel()
lable.textColor = UIColor(hex: 0x888F98) lable.textColor = UIColor.labelTextColor2
lable.font = UIFont.PFSC_R(ofSize: 14) lable.font = UIFont.PFSC_R(ofSize: 14)
lable.text = "身份证头像面" lable.text = "身份证头像面"
lable.textAlignment = .center lable.textAlignment = .center
...@@ -65,7 +65,7 @@ class YHPersonInfoIdentificationCardView: UIView { ...@@ -65,7 +65,7 @@ class YHPersonInfoIdentificationCardView: UIView {
private lazy var subtitleBackLable : UILabel = { private lazy var subtitleBackLable : UILabel = {
let lable = UILabel() let lable = UILabel()
lable.textColor = UIColor(hex: 0x888F98) lable.textColor = UIColor.labelTextColor2
lable.font = UIFont.PFSC_R(ofSize: 14) lable.font = UIFont.PFSC_R(ofSize: 14)
lable.text = "身份证国徽面" lable.text = "身份证国徽面"
lable.textAlignment = .center lable.textAlignment = .center
...@@ -88,21 +88,21 @@ extension YHPersonInfoIdentificationCardView { ...@@ -88,21 +88,21 @@ extension YHPersonInfoIdentificationCardView {
make.top.equalTo(18) make.top.equalTo(18)
make.left.equalTo(18) make.left.equalTo(18)
make.right.equalTo(-18) make.right.equalTo(-18)
make.height.equalTo(17) make.height.equalTo(20)
} }
addSubview(subtitleFrontLable) addSubview(subtitleFrontLable)
subtitleFrontLable.snp.makeConstraints { make in subtitleFrontLable.snp.makeConstraints { make in
make.top.equalTo(titleLable.snp.bottom).offset(20) make.top.equalTo(titleLable.snp.bottom).offset(18)
make.height.equalTo(17) make.height.equalTo(20)
make.left.equalTo(16) make.left.equalTo(titleLable.snp.left)
make.right.equalTo(self.snp.centerX).offset(-4) make.right.equalTo(self.snp.centerX).offset(-4)
} }
addSubview(frontImagV) addSubview(frontImagV)
frontImagV.snp.makeConstraints { make in frontImagV.snp.makeConstraints { make in
make.top.equalTo(subtitleFrontLable.snp.bottom).offset(13) make.top.equalTo(subtitleFrontLable.snp.bottom).offset(11)
make.height.equalTo(95) make.height.equalTo(95)
make.left.equalTo(subtitleFrontLable.snp.left) make.left.equalTo(subtitleFrontLable.snp.left)
make.right.equalTo(subtitleFrontLable.snp.right) make.right.equalTo(subtitleFrontLable.snp.right)
...@@ -112,8 +112,8 @@ extension YHPersonInfoIdentificationCardView { ...@@ -112,8 +112,8 @@ extension YHPersonInfoIdentificationCardView {
addSubview(subtitleBackLable) addSubview(subtitleBackLable)
subtitleBackLable.snp.makeConstraints { make in subtitleBackLable.snp.makeConstraints { make in
make.top.equalTo(titleLable.snp.bottom).offset(20) make.top.equalTo(subtitleFrontLable.snp.top)
make.height.equalTo(17) make.height.equalTo(20)
make.right.equalTo(-18) make.right.equalTo(-18)
make.left.equalTo(self.snp.centerX).offset(4) make.left.equalTo(self.snp.centerX).offset(4)
} }
...@@ -121,7 +121,7 @@ extension YHPersonInfoIdentificationCardView { ...@@ -121,7 +121,7 @@ extension YHPersonInfoIdentificationCardView {
addSubview(backImagV) addSubview(backImagV)
backImagV.snp.makeConstraints { make in backImagV.snp.makeConstraints { make in
make.top.equalTo(subtitleBackLable.snp.bottom).offset(13) make.top.equalTo(subtitleBackLable.snp.bottom).offset(11)
make.height.equalTo(95) make.height.equalTo(95)
make.left.equalTo(subtitleBackLable.snp.left) make.left.equalTo(subtitleBackLable.snp.left)
make.right.equalTo(subtitleBackLable.snp.right) make.right.equalTo(subtitleBackLable.snp.right)
...@@ -131,7 +131,7 @@ extension YHPersonInfoIdentificationCardView { ...@@ -131,7 +131,7 @@ extension YHPersonInfoIdentificationCardView {
addSubview(bottomLine) addSubview(bottomLine)
bottomLine.snp.makeConstraints { make in bottomLine.snp.makeConstraints { make in
make.top.equalTo(backImagV.snp.bottom).offset(15) make.top.equalTo(backImagV.snp.bottom).offset(15.5)
make.height.equalTo(0.5) make.height.equalTo(0.5)
make.left.right.equalToSuperview() make.left.right.equalToSuperview()
......
...@@ -12,7 +12,7 @@ class YHPersonInfoSessionHoldView: UIView { ...@@ -12,7 +12,7 @@ class YHPersonInfoSessionHoldView: UIView {
override init(frame: CGRect) { override init(frame: CGRect) {
super.init(frame: frame) super.init(frame: frame)
backgroundColor = .white backgroundColor = .white
layer.cornerRadius = 6 layer.cornerRadius = kCornerRadius6
clipsToBounds = true clipsToBounds = true
} }
......
...@@ -21,7 +21,7 @@ class YHPersonInfoSessionView: UIView { ...@@ -21,7 +21,7 @@ class YHPersonInfoSessionView: UIView {
//title //title
private lazy var nameLable : UILabel = { private lazy var nameLable : UILabel = {
let lable0 = UILabel(text: "--") let lable0 = UILabel(text: "--")
lable0.textColor = UIColor(hex: 0x222222) lable0.textColor = UIColor.mainTextColor
lable0.font = UIFont.PFSC_M(ofSize: 17) lable0.font = UIFont.PFSC_M(ofSize: 17)
lable0.numberOfLines = 0 lable0.numberOfLines = 0
lable0.lineBreakMode = .byWordWrapping lable0.lineBreakMode = .byWordWrapping
...@@ -44,8 +44,8 @@ class YHPersonInfoSessionView: UIView { ...@@ -44,8 +44,8 @@ class YHPersonInfoSessionView: UIView {
addSubview(nameLable) addSubview(nameLable)
nameLable.snp.makeConstraints { make in nameLable.snp.makeConstraints { make in
make.left.right.equalToSuperview() make.left.right.equalToSuperview()
make.top.equalToSuperview().offset(16) make.top.equalToSuperview().offset(kMargin)
make.bottom.equalTo(bottomLine.snp.top).offset(-16) make.bottom.equalTo(bottomLine.snp.top).offset(-kMargin)
} }
} }
} }
......
{ {
"images" : [ "images" : [
{ {
"filename" : "Rectangle 2418.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "1x" "scale" : "1x"
}, },
{ {
"filename" : "Rectangle 2418@2x.png", "filename" : "信息表背景图@2x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"filename" : "Rectangle 2418@3x.png", "filename" : "信息表背景图@3x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "3x" "scale" : "3x"
} }
......
{
"images" : [
{
"filename" : "截屏2023-04-10 上午9.43.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "截屏2023-04-10 上午9.43@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "截屏2023-04-10 上午9.43@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