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
4d4cacd4
Commit
4d4cacd4
authored
Mar 26, 2025
by
Steven杜宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
// 方案
parent
83270873
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
197 additions
and
4 deletions
+197
-4
YHPlanViewController.swift
...axy/Classes/Modules/Plan(方案)/C/YHPlanViewController.swift
+175
-4
Contents.json
...sets.xcassets/Plan/plan_list_title.imageset/Contents.json
+22
-0
续签至永居方案分析@2x.png
...s.xcassets/Plan/plan_list_title.imageset/续签至永居方案分析@2x.png
+0
-0
续签至永居方案分析@3x.png
...s.xcassets/Plan/plan_list_title.imageset/续签至永居方案分析@3x.png
+0
-0
No files found.
galaxy/galaxy/Classes/Modules/Plan(方案)/C/YHPlanViewController.swift
View file @
4d4cacd4
...
...
@@ -7,6 +7,7 @@
//
import
UIKit
import
JXSegmentedView
class
YHPlanViewController
:
YHBaseViewController
{
...
...
@@ -17,6 +18,7 @@ class YHPlanViewController: YHBaseViewController {
"双法防"
,
"沙发上"
,
"啊防守打法"
]
let
topScrollHeight
=
146.0
-
44.0
lazy
var
tableView
:
UITableView
=
{
let
tableView
=
UITableView
(
frame
:
.
zero
,
style
:
.
grouped
)
...
...
@@ -24,6 +26,7 @@ class YHPlanViewController: YHBaseViewController {
if
#available(iOS 11.0, *)
{
tableView
.
contentInsetAdjustmentBehavior
=
.
never
}
tableView
.
bounces
=
false
tableView
.
showsVerticalScrollIndicator
=
false
tableView
.
estimatedSectionHeaderHeight
=
1.0
tableView
.
estimatedSectionFooterHeight
=
1.0
...
...
@@ -35,27 +38,187 @@ class YHPlanViewController: YHBaseViewController {
tableView
.
register
(
YHPlanScoreCell
.
self
,
forCellReuseIdentifier
:
YHPlanScoreCell
.
cellReuseIdentifier
)
tableView
.
register
(
YHPlanCustomerCaseListCell
.
self
,
forCellReuseIdentifier
:
YHPlanCustomerCaseListCell
.
cellReuseIdentifier
)
tableView
.
register
(
UITableViewCell
.
self
,
forCellReuseIdentifier
:
"UITableViewCell"
)
view
.
backgroundColor
=
.
clear
tableView
.
tableHeaderView
=
headerView
return
tableView
}()
lazy
var
headerView
:
UIView
=
{
let
v
=
UIView
(
frame
:
CGRect
(
x
:
0
,
y
:
0
,
width
:
KScreenWidth
,
height
:
146.0
))
v
.
addSubview
(
titleImgView
)
v
.
addSubview
(
descLabel
)
v
.
addSubview
(
revalueBtn
)
segmented1View
.
dataSource
=
segmented1DataSource
v
.
addSubview
(
segmented1View
)
titleImgView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
16
)
make
.
width
.
equalTo
(
266
)
make
.
height
.
equalTo
(
29
)
make
.
top
.
equalTo
(
18
)
}
descLabel
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
16
)
make
.
top
.
equalTo
(
titleImgView
.
snp
.
bottom
)
.
offset
(
17
)
make
.
height
.
equalTo
(
16
)
}
revalueBtn
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalTo
(
titleImgView
)
.
offset
(
16
)
make
.
right
.
equalTo
(
-
16
)
make
.
width
.
equalTo
(
68
)
make
.
height
.
equalTo
(
28
)
}
segmented1View
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
16
)
make
.
right
.
equalTo
(
-
16
)
make
.
height
.
equalTo
(
30
)
make
.
bottom
.
equalTo
(
-
10
)
}
return
v
}()
lazy
var
bgImgView
:
UIImageView
=
{
let
v
=
UIImageView
()
v
.
image
=
UIImage
(
named
:
"plan_list_head_bg"
)
return
v
}()
lazy
var
titleImgView
:
UIImageView
=
{
let
v
=
UIImageView
()
v
.
image
=
UIImage
(
named
:
"plan_list_title"
)
return
v
}()
lazy
var
descLabel
:
UILabel
=
{
let
lable
=
UILabel
()
lable
.
textColor
=
UIColor
.
init
(
hex
:
0xFFFFFF
,
alpha
:
0.6
)
lable
.
textAlignment
=
.
left
lable
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
12
)
lable
.
text
=
"具体方案您可以联系专属顾问和生活管家深入咨询"
return
lable
}()
lazy
var
revalueBtn
:
UIButton
=
{
let
btn
=
UIButton
()
btn
.
backgroundColor
=
.
clear
btn
.
setTitle
(
"重新评估"
,
for
:
.
normal
)
btn
.
setTitleColor
(
.
white
,
for
:
.
normal
)
btn
.
titleLabel
?
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
11
)
btn
.
addTarget
(
self
,
action
:
#selector(
didRevalueBtnClicked
)
,
for
:
.
touchUpInside
)
btn
.
layer
.
cornerRadius
=
kCornerRadius3
btn
.
layer
.
borderWidth
=
0.5
btn
.
layer
.
borderColor
=
UIColor
.
init
(
hex
:
0xFFFFFF
,
alpha
:
0.2
)
.
cgColor
btn
.
YH_clickEdgeInsets
=
UIEdgeInsets
(
top
:
20
,
left
:
20
,
bottom
:
20
,
right
:
20
)
return
btn
}()
let
segmentTitles
=
[
"综合"
,
"工作"
,
"生活"
,
"投资"
,
"逗留"
]
lazy
var
segmented1View
:
JXSegmentedView
=
{
let
view
=
JXSegmentedView
(
frame
:
CGRect
(
x
:
0
,
y
:
k_Height_safeAreaInsetsTop
(),
width
:
KScreenWidth
,
height
:
30
))
view
.
backgroundColor
=
.
clear
// 配置指示器
let
indicator
=
JXSegmentedIndicatorLineView
()
indicator
.
indicatorWidth
=
16
indicator
.
indicatorHeight
=
2
indicator
.
indicatorCornerRadius
=
0.0
indicator
.
indicatorColor
=
UIColor
.
white
view
.
indicators
=
[
indicator
]
return
view
}()
lazy
var
segmented1DataSource
:
JXSegmentedTitleDataSource
=
{
let
dataSource
=
JXSegmentedTitleDataSource
()
dataSource
.
titles
=
segmentTitles
dataSource
.
titleNormalFont
=
UIFont
.
PFSC_R
(
ofSize
:
16
)
dataSource
.
titleNormalColor
=
UIColor
.
init
(
hex
:
0xFFFFFF
,
alpha
:
0.6
)
dataSource
.
titleSelectedFont
=
UIFont
.
PFSC_M
(
ofSize
:
16
)
dataSource
.
titleSelectedColor
=
.
white
dataSource
.
isItemSpacingAverageEnabled
=
false
dataSource
.
itemWidth
=
(
KScreenWidth
-
16.0
*
2.0
)
/
Double
(
segmentTitles
.
count
)
dataSource
.
itemSpacing
=
0.0
return
dataSource
}()
lazy
var
segmented2View
:
JXSegmentedView
=
{
let
view
=
JXSegmentedView
(
frame
:
CGRect
(
x
:
0
,
y
:
k_Height_safeAreaInsetsTop
(),
width
:
KScreenWidth
,
height
:
48
))
view
.
backgroundColor
=
.
clear
// 配置指示器
let
indicator
=
JXSegmentedIndicatorLineView
()
indicator
.
indicatorWidth
=
16
indicator
.
indicatorHeight
=
2
indicator
.
indicatorCornerRadius
=
0.0
indicator
.
indicatorColor
=
.
mainTextColor
view
.
indicators
=
[
indicator
]
return
view
}()
lazy
var
segmented2DataSource
:
JXSegmentedTitleDataSource
=
{
let
dataSource
=
JXSegmentedTitleDataSource
()
dataSource
.
titles
=
segmentTitles
dataSource
.
titleNormalFont
=
UIFont
.
PFSC_R
(
ofSize
:
16
)
dataSource
.
titleNormalColor
=
UIColor
.
init
(
hex
:
0x6A7586
)
dataSource
.
titleSelectedFont
=
UIFont
.
PFSC_M
(
ofSize
:
16
)
dataSource
.
titleSelectedColor
=
.
mainTextColor
dataSource
.
isItemSpacingAverageEnabled
=
false
dataSource
.
itemWidth
=
(
KScreenWidth
-
16.0
*
2.0
)
/
Double
(
segmentTitles
.
count
)
dataSource
.
itemSpacing
=
0.0
return
dataSource
}()
lazy
var
fixedSegmentView
:
UIView
=
{
let
v
=
UIView
()
v
.
backgroundColor
=
.
white
segmented2View
.
dataSource
=
segmented2DataSource
v
.
addSubview
(
segmented2View
)
segmented2View
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
16
)
make
.
right
.
equalTo
(
-
16
)
make
.
height
.
equalTo
(
30
)
make
.
bottom
.
equalTo
(
-
6
)
make
.
top
.
equalTo
(
8
)
}
return
v
}()
@objc
func
didRevalueBtnClicked
()
{
}
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
self
.
view
.
backgroundColor
=
.
init
(
hex
:
0xF
5F6F8
)
self
.
view
.
backgroundColor
=
.
init
(
hex
:
0xF
8F9FB
)
self
.
view
.
addSubview
(
bgImgView
)
self
.
view
.
addSubview
(
tableView
)
self
.
view
.
addSubview
(
fixedSegmentView
)
bgImgView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
right
.
top
.
equalToSuperview
()
make
.
height
.
equalTo
(
bgImgView
.
snp
.
width
)
}
tableView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
right
.
bottom
.
equalToSuperview
()
make
.
top
.
equalTo
(
200
)
make
.
top
.
equalTo
(
k_Height_NavigationtBarAndStatuBar
)
}
fixedSegmentView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
right
.
equalToSuperview
()
make
.
top
.
equalTo
(
k_Height_NavigationtBarAndStatuBar
)
make
.
height
.
equalTo
(
44
)
}
}
}
...
...
@@ -136,8 +299,8 @@ extension YHPlanViewController: UITableViewDelegate, UITableViewDataSource {
var
yOffset1
=
0.0
var
yOffset2
=
0.0
for
(
index
,
item
)
in
cases
.
enumerated
()
{
var
textHeight
=
self
.
getHeigt
(
font
:
UIFont
.
PFSC_R
(
ofSize
:
14
),
width
:
cellWidth
-
8.0
*
2.0
,
string
:
cases
[
index
])
for
(
index
,
_
)
in
cases
.
enumerated
()
{
let
textHeight
=
self
.
getHeigt
(
font
:
UIFont
.
PFSC_R
(
ofSize
:
14
),
width
:
cellWidth
-
8.0
*
2.0
,
string
:
cases
[
index
])
let
caseCellHeight
=
textHeight
+
(
cellWidth
*
(
200.0
/
166.0
)
+
8.0
+
12.0
+
10.0
)
if
index
%
2
==
0
{
...
...
@@ -149,5 +312,13 @@ extension YHPlanViewController: UITableViewDelegate, UITableViewDataSource {
let
contentHeight
=
max
(
yOffset1
,
yOffset2
)
+
20.0
+
12.0
return
contentHeight
}
}
extension
YHPlanViewController
:
UIScrollViewDelegate
{
func
scrollViewDidScroll
(
_
scrollView
:
UIScrollView
)
{
bgImgView
.
isHidden
=
scrollView
.
contentOffset
.
y
>=
topScrollHeight
segmented2View
.
isHidden
=
scrollView
.
contentOffset
.
y
<
topScrollHeight
}
}
galaxy/galaxy/Res/Assets.xcassets/Plan/plan_list_title.imageset/Contents.json
0 → 100644
View file @
4d4cacd4
{
"images"
:
[
{
"idiom"
:
"universal"
,
"scale"
:
"1x"
},
{
"filename"
:
"续签至永居方案分析@2x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"2x"
},
{
"filename"
:
"续签至永居方案分析@3x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
galaxy/galaxy/Res/Assets.xcassets/Plan/plan_list_title.imageset/续签至永居方案分析@2x.png
0 → 100644
View file @
4d4cacd4
10.3 KB
galaxy/galaxy/Res/Assets.xcassets/Plan/plan_list_title.imageset/续签至永居方案分析@3x.png
0 → 100644
View file @
4d4cacd4
14.9 KB
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