Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
galaxy-iOS
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mobile-group
galaxy-iOS
Commits
7bdc068a
Commit
7bdc068a
authored
Mar 27, 2025
by
pete谢兆麟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
plan
parent
0827354f
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
236 additions
and
20 deletions
+236
-20
project.pbxproj
galaxy/galaxy.xcodeproj/project.pbxproj
+8
-0
YHServiceCenterViewController.swift
...中心)/OrderList(服务订单)/C/YHServiceCenterViewController.swift
+10
-9
YHMakePlanViewController.swift
...odules/Plan(方案)/MakePlan/C/YHMakePlanViewController.swift
+3
-7
YHMakePlanCusttomHeadView.swift
...dules/Plan(方案)/MakePlan/V/YHMakePlanCusttomHeadView.swift
+99
-0
YHMakePlanHeadView.swift
...sses/Modules/Plan(方案)/MakePlan/V/YHMakePlanHeadView.swift
+14
-4
YHMakePlanStateHeadView.swift
...Modules/Plan(方案)/MakePlan/V/YHMakePlanStateHeadView.swift
+102
-0
No files found.
galaxy/galaxy.xcodeproj/project.pbxproj
View file @
7bdc068a
...
@@ -1226,6 +1226,8 @@
...
@@ -1226,6 +1226,8 @@
04AFEF5B2D76DC740007A011
/* YHTravelCertificateUsageTipsView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04AFEF5A2D76DC740007A011
/* YHTravelCertificateUsageTipsView.swift */
;
};
04AFEF5B2D76DC740007A011
/* YHTravelCertificateUsageTipsView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04AFEF5A2D76DC740007A011
/* YHTravelCertificateUsageTipsView.swift */
;
};
04B00F7E2D94FB3C00F640C5
/* YHMakePlanViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04B00F7D2D94FB3C00F640C5
/* YHMakePlanViewController.swift */
;
};
04B00F7E2D94FB3C00F640C5
/* YHMakePlanViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04B00F7D2D94FB3C00F640C5
/* YHMakePlanViewController.swift */
;
};
04B00F802D951D0B00F640C5
/* YHMakePlanHeadView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04B00F7F2D951D0B00F640C5
/* YHMakePlanHeadView.swift */
;
};
04B00F802D951D0B00F640C5
/* YHMakePlanHeadView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04B00F7F2D951D0B00F640C5
/* YHMakePlanHeadView.swift */
;
};
04B00F822D95497400F640C5
/* YHMakePlanStateHeadView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04B00F812D95497400F640C5
/* YHMakePlanStateHeadView.swift */
;
};
04B00F842D95518C00F640C5
/* YHMakePlanCusttomHeadView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04B00F832D95518C00F640C5
/* YHMakePlanCusttomHeadView.swift */
;
};
04D8FF552D9258AA00703C75
/* YHPlanScoreView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04D8FF542D9258AA00703C75
/* YHPlanScoreView.swift */
;
};
04D8FF552D9258AA00703C75
/* YHPlanScoreView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04D8FF542D9258AA00703C75
/* YHPlanScoreView.swift */
;
};
04D8FF572D925A0800703C75
/* YHPlanScoreChart.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04D8FF562D925A0800703C75
/* YHPlanScoreChart.swift */
;
};
04D8FF572D925A0800703C75
/* YHPlanScoreChart.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04D8FF562D925A0800703C75
/* YHPlanScoreChart.swift */
;
};
04D8FF592D925E6700703C75
/* YHPlanModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04D8FF582D925E6700703C75
/* YHPlanModel.swift */
;
};
04D8FF592D925E6700703C75
/* YHPlanModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04D8FF582D925E6700703C75
/* YHPlanModel.swift */
;
};
...
@@ -2504,6 +2506,8 @@
...
@@ -2504,6 +2506,8 @@
04AFEF5A2D76DC740007A011
/* YHTravelCertificateUsageTipsView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHTravelCertificateUsageTipsView.swift
;
sourceTree
=
"<group>"
;
};
04AFEF5A2D76DC740007A011
/* YHTravelCertificateUsageTipsView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHTravelCertificateUsageTipsView.swift
;
sourceTree
=
"<group>"
;
};
04B00F7D2D94FB3C00F640C5
/* YHMakePlanViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHMakePlanViewController.swift
;
sourceTree
=
"<group>"
;
};
04B00F7D2D94FB3C00F640C5
/* YHMakePlanViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHMakePlanViewController.swift
;
sourceTree
=
"<group>"
;
};
04B00F7F2D951D0B00F640C5
/* YHMakePlanHeadView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHMakePlanHeadView.swift
;
sourceTree
=
"<group>"
;
};
04B00F7F2D951D0B00F640C5
/* YHMakePlanHeadView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHMakePlanHeadView.swift
;
sourceTree
=
"<group>"
;
};
04B00F812D95497400F640C5
/* YHMakePlanStateHeadView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHMakePlanStateHeadView.swift
;
sourceTree
=
"<group>"
;
};
04B00F832D95518C00F640C5
/* YHMakePlanCusttomHeadView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHMakePlanCusttomHeadView.swift
;
sourceTree
=
"<group>"
;
};
04D8FF542D9258AA00703C75
/* YHPlanScoreView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHPlanScoreView.swift
;
sourceTree
=
"<group>"
;
};
04D8FF542D9258AA00703C75
/* YHPlanScoreView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHPlanScoreView.swift
;
sourceTree
=
"<group>"
;
};
04D8FF562D925A0800703C75
/* YHPlanScoreChart.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHPlanScoreChart.swift
;
sourceTree
=
"<group>"
;
};
04D8FF562D925A0800703C75
/* YHPlanScoreChart.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHPlanScoreChart.swift
;
sourceTree
=
"<group>"
;
};
04D8FF582D925E6700703C75
/* YHPlanModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHPlanModel.swift
;
sourceTree
=
"<group>"
;
};
04D8FF582D925E6700703C75
/* YHPlanModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHPlanModel.swift
;
sourceTree
=
"<group>"
;
};
...
@@ -6675,6 +6679,8 @@
...
@@ -6675,6 +6679,8 @@
isa
=
PBXGroup
;
isa
=
PBXGroup
;
children
=
(
children
=
(
04B00F7F2D951D0B00F640C5
/* YHMakePlanHeadView.swift */
,
04B00F7F2D951D0B00F640C5
/* YHMakePlanHeadView.swift */
,
04B00F812D95497400F640C5
/* YHMakePlanStateHeadView.swift */
,
04B00F832D95518C00F640C5
/* YHMakePlanCusttomHeadView.swift */
,
);
);
path
=
V
;
path
=
V
;
sourceTree
=
"<group>"
;
sourceTree
=
"<group>"
;
...
@@ -7327,6 +7333,7 @@
...
@@ -7327,6 +7333,7 @@
045C10852D12CA5F00BD2DC0
/* YHResignAppointOptionResultCell.swift in Sources */
,
045C10852D12CA5F00BD2DC0
/* YHResignAppointOptionResultCell.swift in Sources */
,
045C10862D12CA5F00BD2DC0
/* YHServiceItemCell.swift in Sources */
,
045C10862D12CA5F00BD2DC0
/* YHServiceItemCell.swift in Sources */
,
045C10872D12CA5F00BD2DC0
/* YHServiceOrderProgressTableViewCell.swift in Sources */
,
045C10872D12CA5F00BD2DC0
/* YHServiceOrderProgressTableViewCell.swift in Sources */
,
04B00F822D95497400F640C5
/* YHMakePlanStateHeadView.swift in Sources */
,
045C10882D12CA5F00BD2DC0
/* YHResignUploadTravelCardDetailModel.swift in Sources */
,
045C10882D12CA5F00BD2DC0
/* YHResignUploadTravelCardDetailModel.swift in Sources */
,
045C10892D12CA5F00BD2DC0
/* YHAppointHKResultModel.swift in Sources */
,
045C10892D12CA5F00BD2DC0
/* YHAppointHKResultModel.swift in Sources */
,
04D8FF612D939D2400703C75
/* YHPlanScoreCell.swift in Sources */
,
04D8FF612D939D2400703C75
/* YHPlanScoreCell.swift in Sources */
,
...
@@ -8053,6 +8060,7 @@
...
@@ -8053,6 +8060,7 @@
045C13012D12CA5F00BD2DC0
/* YHPreviewFamilyMemberViewController.swift in Sources */
,
045C13012D12CA5F00BD2DC0
/* YHPreviewFamilyMemberViewController.swift in Sources */
,
0411CF102D1C055100644D35
/* YHGCSignatureAddViewController.swift in Sources */
,
0411CF102D1C055100644D35
/* YHGCSignatureAddViewController.swift in Sources */
,
045C13022D12CA5F00BD2DC0
/* YHPictureReviewManager.swift in Sources */
,
045C13022D12CA5F00BD2DC0
/* YHPictureReviewManager.swift in Sources */
,
04B00F842D95518C00F640C5
/* YHMakePlanCusttomHeadView.swift in Sources */
,
045C13032D12CA5F00BD2DC0
/* YHBasicInfoFillViewController.swift in Sources */
,
045C13032D12CA5F00BD2DC0
/* YHBasicInfoFillViewController.swift in Sources */
,
045C13042D12CA5F00BD2DC0
/* YHImproveSchemeTemplateListCell.swift in Sources */
,
045C13042D12CA5F00BD2DC0
/* YHImproveSchemeTemplateListCell.swift in Sources */
,
0411CEE92D15123B00644D35
/* YHGCWorkExperienceListViewController.swift in Sources */
,
0411CEE92D15123B00644D35
/* YHGCWorkExperienceListViewController.swift in Sources */
,
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/OrderList(服务订单)/C/YHServiceCenterViewController.swift
View file @
7bdc068a
...
@@ -127,15 +127,16 @@ class YHServiceCenterViewController: YHBaseViewController {
...
@@ -127,15 +127,16 @@ class YHServiceCenterViewController: YHBaseViewController {
}
}
private
func
goToServiceProgressVC
()
{
private
func
goToServiceProgressVC
()
{
let
vc
=
YHOrderDetailViewController
()
let
vc
=
YHMakePlanViewController
()
vc
.
model
=
oldModel
// let vc = YHOrderDetailViewController()
vc
.
backDate
=
{
[
weak
self
]
model
in
// vc.model = oldModel
guard
let
self
=
self
else
{
return
}
// vc.backDate = { [weak self] model in
self
.
model
=
model
// guard let self = self else { return }
self
.
state
=
0
// self.model = model
self
.
headIndex
=
0
// self.state = 0
self
.
isCanSelectStep
=
false
// self.headIndex = 0
}
// self.isCanSelectStep = false
// }
self
.
navigationController
?
.
pushViewController
(
vc
)
self
.
navigationController
?
.
pushViewController
(
vc
)
}
}
...
...
galaxy/galaxy/Classes/Modules/Plan(方案)/MakePlan/C/YHMakePlanViewController.swift
View file @
7bdc068a
...
@@ -24,20 +24,18 @@ class YHMakePlanViewController: YHBaseViewController {
...
@@ -24,20 +24,18 @@ class YHMakePlanViewController: YHBaseViewController {
tableView
.
delegate
=
self
tableView
.
delegate
=
self
tableView
.
dataSource
=
self
tableView
.
dataSource
=
self
tableView
.
register
(
YHComprehensiveEvaluationCell
.
self
,
forCellReuseIdentifier
:
YHComprehensiveEvaluationCell
.
cellReuseIdentifier
)
tableView
.
register
(
YHComprehensiveEvaluationCell
.
self
,
forCellReuseIdentifier
:
YHComprehensiveEvaluationCell
.
cellReuseIdentifier
)
tableView
.
tableHeaderView
=
YHMakePlanHeadView
()
tableView
.
tableHeaderView
=
YHMakePlanHeadView
(
frame
:
CGRect
(
x
:
0
,
y
:
0
,
width
:
KScreenWidth
,
height
:
333
.
fix
+
44
)
)
return
tableView
return
tableView
}()
}()
override
func
viewDidLoad
()
{
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
super
.
viewDidLoad
()
gk_navTitle
=
"续签至永居方案私人订制"
//
gk_navTitle = "续签至永居方案私人订制"
gk_navTitleColor
=
.
white
gk_navTitleColor
=
.
white
gk_navBarAlpha
=
1
gk_navBarAlpha
=
1
gk_navBackgroundImage
=
UIImage
(
named
:
"my_scheme_nav"
)
//
gk_navBackgroundImage = UIImage(named: "my_scheme_nav")
gk_backImage
=
UIImage
(
named
:
"back_icon_white"
)
gk_backImage
=
UIImage
(
named
:
"back_icon_white"
)
view
.
backgroundColor
=
.
init
(
hex
:
0x090B26
)
self
.
view
.
addSubview
(
tableView
)
self
.
view
.
addSubview
(
tableView
)
tableView
.
snp
.
makeConstraints
{
make
in
tableView
.
snp
.
makeConstraints
{
make
in
...
@@ -53,7 +51,6 @@ class YHMakePlanViewController: YHBaseViewController {
...
@@ -53,7 +51,6 @@ class YHMakePlanViewController: YHBaseViewController {
func
submitTargets
()
{
func
submitTargets
()
{
}
}
}
}
...
@@ -97,4 +94,3 @@ extension YHMakePlanViewController: UITableViewDelegate, UITableViewDataSource {
...
@@ -97,4 +94,3 @@ extension YHMakePlanViewController: UITableViewDelegate, UITableViewDataSource {
}
}
}
}
galaxy/galaxy/Classes/Modules/Plan(方案)/MakePlan/V/YHMakePlanCusttomHeadView.swift
0 → 100644
View file @
7bdc068a
//
// YHMakePlanCusttomHeadView.swift
// galaxy
//
// Created by EDY on 2025/3/27.
// Copyright © 2025 https://www.galaxy-immi.com. All rights reserved.
//
import
UIKit
class
YHMakePlanCusttomHeadView
:
UIView
{
// Data
private
let
tabs
=
[
"基础身份"
,
"工作联系"
,
"生活联系"
,
"投资联系"
]
private
var
buttons
:
[
UIButton
]
=
[]
private
var
selectedIndex
:
Int
=
0
// UI Components
private
lazy
var
stackView
:
UIStackView
=
{
let
stack
=
UIStackView
()
stack
.
axis
=
.
horizontal
stack
.
distribution
=
.
fillEqually
return
stack
}()
private
let
underlineView
:
UIView
=
{
let
view
=
UIView
()
view
.
backgroundColor
=
.
systemBlue
return
view
}()
// MARK: - Initialization
override
init
(
frame
:
CGRect
)
{
super
.
init
(
frame
:
frame
)
setupUI
()
setupConstraints
()
}
required
init
?(
coder
:
NSCoder
)
{
super
.
init
(
coder
:
coder
)
setupUI
()
setupConstraints
()
}
// MARK: - Setup
private
func
setupUI
()
{
backgroundColor
=
.
systemBackground
// Create buttons
tabs
.
enumerated
()
.
forEach
{
index
,
title
in
let
button
=
UIButton
(
type
:
.
system
)
button
.
setTitle
(
title
,
for
:
.
normal
)
button
.
titleLabel
?
.
font
=
UIFont
.
systemFont
(
ofSize
:
14
)
button
.
setTitleColor
(
index
==
0
?
.
systemBlue
:
.
gray
,
for
:
.
normal
)
button
.
tag
=
index
button
.
addTarget
(
self
,
action
:
#selector(
tabTapped(_:)
)
,
for
:
.
touchUpInside
)
buttons
.
append
(
button
)
stackView
.
addArrangedSubview
(
button
)
}
addSubview
(
stackView
)
addSubview
(
underlineView
)
}
private
func
setupConstraints
()
{
stackView
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalToSuperview
()
make
.
leading
.
trailing
.
equalToSuperview
()
make
.
height
.
equalTo
(
40
)
}
underlineView
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalTo
(
stackView
.
snp
.
bottom
)
make
.
height
.
equalTo
(
2
)
make
.
width
.
equalToSuperview
()
.
dividedBy
(
tabs
.
count
)
make
.
leading
.
equalToSuperview
()
}
}
// MARK: - Actions
@objc
private
func
tabTapped
(
_
sender
:
UIButton
)
{
let
newIndex
=
sender
.
tag
guard
newIndex
!=
selectedIndex
else
{
return
}
// Update colors
buttons
[
selectedIndex
]
.
setTitleColor
(
.
gray
,
for
:
.
normal
)
buttons
[
newIndex
]
.
setTitleColor
(
.
systemBlue
,
for
:
.
normal
)
// Animate underline
UIView
.
animate
(
withDuration
:
0.3
)
{
self
.
underlineView
.
snp
.
updateConstraints
{
make
in
make
.
leading
.
equalToSuperview
()
.
offset
(
sender
.
frame
.
origin
.
x
)
}
self
.
layoutIfNeeded
()
}
selectedIndex
=
newIndex
}
}
galaxy/galaxy/Classes/Modules/Plan(方案)/MakePlan/V/YHMakePlanHeadView.swift
View file @
7bdc068a
...
@@ -16,19 +16,24 @@ class YHMakePlanHeadView: UIView {
...
@@ -16,19 +16,24 @@ class YHMakePlanHeadView: UIView {
return
view
return
view
}()
}()
private
lazy
var
centerView
:
UI
View
=
{
private
lazy
var
centerView
:
YHMakePlanStateHead
View
=
{
let
view
=
UI
View
()
let
view
=
YHMakePlanStateHead
View
()
view
.
backgroundColor
=
.
white
view
.
backgroundColor
=
.
white
view
.
layer
.
cornerRadius
=
4
view
.
layer
.
cornerRadius
=
4
return
view
return
view
}()
}()
private
lazy
var
logoImageView
:
UIImageView
=
{
private
lazy
var
logoImageView
:
UIImageView
=
{
let
view
=
UIImageView
()
let
view
=
UIImageView
()
view
.
image
=
UIImage
(
named
:
"plan_head_logo"
)
view
.
image
=
UIImage
(
named
:
"plan_head_logo"
)
return
view
return
view
}()
}()
private
lazy
var
custtomView
:
YHMakePlanCusttomHeadView
=
{
let
view
=
YHMakePlanCusttomHeadView
()
return
view
}()
override
init
(
frame
:
CGRect
)
{
override
init
(
frame
:
CGRect
)
{
super
.
init
(
frame
:
frame
)
super
.
init
(
frame
:
frame
)
backgroundColor
=
UIColor
(
hex
:
0x070E33
)
backgroundColor
=
UIColor
(
hex
:
0x070E33
)
...
@@ -47,6 +52,7 @@ class YHMakePlanHeadView: UIView {
...
@@ -47,6 +52,7 @@ class YHMakePlanHeadView: UIView {
addSubview
(
centerImageView
)
addSubview
(
centerImageView
)
addSubview
(
centerView
)
addSubview
(
centerView
)
addSubview
(
logoImageView
)
addSubview
(
logoImageView
)
addSubview
(
custtomView
)
centerImageView
.
snp
.
makeConstraints
{
make
in
centerImageView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
right
.
top
.
equalToSuperview
()
make
.
left
.
right
.
top
.
equalToSuperview
()
...
@@ -67,5 +73,9 @@ class YHMakePlanHeadView: UIView {
...
@@ -67,5 +73,9 @@ class YHMakePlanHeadView: UIView {
make
.
top
.
equalTo
(
96
)
make
.
top
.
equalTo
(
96
)
}
}
custtomView
.
snp
.
makeConstraints
{
make
in
make
.
bottom
.
left
.
right
.
equalToSuperview
()
make
.
height
.
equalTo
(
44
)
}
}
}
}
}
galaxy/galaxy/Classes/Modules/Plan(方案)/MakePlan/V/YHMakePlanStateHeadView.swift
0 → 100644
View file @
7bdc068a
//
// YHMakePlanStateHeadView.swift
// galaxy
//
// Created by EDY on 2025/3/27.
// Copyright © 2025 https://www.galaxy-immi.com. All rights reserved.
//
import
UIKit
class
YHMakePlanStateHeadView
:
UIView
{
// MARK: - UI Components
private
let
yearsLabel
:
UILabel
=
{
let
label
=
UILabel
()
label
.
text
=
"5"
label
.
font
=
.
boldSystemFont
(
ofSize
:
32
)
label
.
textColor
=
.
label
label
.
textAlignment
=
.
center
return
label
}()
private
let
yearsDescriptionLabel
:
UILabel
=
{
let
label
=
UILabel
()
label
.
text
=
"预计可续期(年)"
label
.
font
=
.
systemFont
(
ofSize
:
14
)
label
.
textColor
=
.
secondaryLabel
label
.
textAlignment
=
.
center
return
label
}()
private
let
percentageLabel
:
UILabel
=
{
let
label
=
UILabel
()
label
.
text
=
"90%"
label
.
font
=
.
boldSystemFont
(
ofSize
:
32
)
label
.
textColor
=
.
label
label
.
textAlignment
=
.
center
return
label
}()
private
let
progressDescriptionLabel
:
UILabel
=
{
let
label
=
UILabel
()
label
.
text
=
"续签综合通过率"
label
.
font
=
.
systemFont
(
ofSize
:
14
)
label
.
textColor
=
.
secondaryLabel
label
.
textAlignment
=
.
center
return
label
}()
// MARK: - Initialization
override
init
(
frame
:
CGRect
)
{
super
.
init
(
frame
:
frame
)
setupView
()
setupConstraints
()
}
required
init
?(
coder
:
NSCoder
)
{
super
.
init
(
coder
:
coder
)
setupView
()
setupConstraints
()
}
// MARK: - Setup
private
func
setupView
()
{
addSubview
(
yearsLabel
)
addSubview
(
yearsDescriptionLabel
)
addSubview
(
percentageLabel
)
addSubview
(
progressDescriptionLabel
)
}
private
func
setupConstraints
()
{
yearsLabel
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalToSuperview
()
.
offset
(
16
)
make
.
left
.
equalToSuperview
()
.
offset
(
16
)
make
.
right
.
equalTo
(
self
.
snp
.
centerX
)
}
yearsDescriptionLabel
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalTo
(
yearsLabel
.
snp
.
bottom
)
.
offset
(
4
)
make
.
left
.
equalToSuperview
()
.
offset
(
16
)
make
.
right
.
equalTo
(
self
.
snp
.
centerX
)
}
percentageLabel
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalToSuperview
()
.
offset
(
16
)
make
.
right
.
equalToSuperview
()
.
offset
(
-
16
)
make
.
left
.
equalTo
(
self
.
snp
.
centerX
)
}
progressDescriptionLabel
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalTo
(
percentageLabel
.
snp
.
bottom
)
.
offset
(
4
)
make
.
right
.
equalToSuperview
()
.
offset
(
-
16
)
make
.
left
.
equalTo
(
self
.
snp
.
centerX
)
}
}
// MARK: - Configuration
func
configure
(
years
:
Int
,
percentage
:
Float
)
{
yearsLabel
.
text
=
"
\(
years
)
"
percentageLabel
.
text
=
"
\(
Int
(
percentage
*
100
)
)
%"
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment