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
181cc9c6
Commit
181cc9c6
authored
May 19, 2024
by
David黄金龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
处理一处渐变 与UI 100% 吻合 哈哈哈哈哈哈
parent
f82c5e77
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
6 deletions
+15
-6
YHScorePersonInfoCell.swift
...Service(服务中心)/MyScore(我的评分)/V/YHScorePersonInfoCell.swift
+15
-6
No files found.
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MyScore(我的评分)/V/YHScorePersonInfoCell.swift
View file @
181cc9c6
...
@@ -93,6 +93,7 @@ class YHScorePersonInfoCell: UITableViewCell {
...
@@ -93,6 +93,7 @@ class YHScorePersonInfoCell: UITableViewCell {
private
let
secondHoldView
=
UIView
()
private
let
secondHoldView
=
UIView
()
private
let
fakeView
=
UIView
()
var
gradientLayer
:
CAGradientLayer
=
{
var
gradientLayer
:
CAGradientLayer
=
{
...
@@ -217,17 +218,21 @@ extension YHScorePersonInfoCell {
...
@@ -217,17 +218,21 @@ extension YHScorePersonInfoCell {
}
}
let
width
=
scoreLable
.
requiredWidth
let
width
=
scoreLable
.
requiredWidth
gradientLayer
.
frame
=
CGRect
(
x
:
(
148
-
width
)
/
2.0
,
y
:
(
105
-
80
)
/
2.0
,
width
:
width
,
height
:
80
)
fakeView
.
frame
=
CGRect
(
x
:
(
148
-
width
)
/
2.0
,
y
:
(
105
-
80
)
/
2.0
,
width
:
width
,
height
:
80
)
secondHoldView
.
addSubview
(
fakeView
)
gradientLayer
.
frame
=
fakeView
.
bounds
scoreLable
.
layer
.
frame
=
gradientLayer
.
bounds
scoreLable
.
layer
.
frame
=
gradientLayer
.
bounds
gradientLayer
.
mask
=
scoreLable
.
layer
gradientLayer
.
mask
=
scoreLable
.
layer
secondHold
View
.
layer
.
insertSublayer
(
gradientLayer
,
at
:
0
)
fake
View
.
layer
.
insertSublayer
(
gradientLayer
,
at
:
0
)
secondHoldView
.
addSubview
(
fenLable
)
secondHoldView
.
addSubview
(
fenLable
)
fenLable
.
frame
=
CGRect
(
x
:
gradientLayer
.
frame
.
origin
.
x
+
width
,
y
:
gradientLayer
.
frame
.
origin
.
y
+
80
-
13
-
17
-
4
,
width
:
18
,
height
:
17
)
fenLable
.
frame
=
CGRect
(
x
:
fakeView
.
frame
.
origin
.
x
+
width
,
y
:
fakeView
.
frame
.
origin
.
y
+
80
-
13
-
17
-
4
,
width
:
18
,
height
:
17
)
}
}
...
@@ -243,13 +248,17 @@ extension YHScorePersonInfoCell {
...
@@ -243,13 +248,17 @@ extension YHScorePersonInfoCell {
let
score
:
String
=
String
(
model
.
total_score
?
.
sum_score
??
0
)
let
score
:
String
=
String
(
model
.
total_score
?
.
sum_score
??
0
)
scoreLable
.
text
=
score
scoreLable
.
text
=
score
let
width
=
scoreLable
.
requiredWidth
let
width
=
scoreLable
.
requiredWidth
gradientLayer
.
frame
=
CGRect
(
x
:
(
148
-
width
)
/
2.0
,
y
:
(
105
-
80
)
/
2.0
,
width
:
width
,
height
:
80
)
fakeView
.
frame
=
CGRect
(
x
:
(
148
-
width
)
/
2.0
,
y
:
(
105
-
80
)
/
2.0
,
width
:
width
,
height
:
80
)
gradientLayer
.
frame
=
fakeView
.
bounds
scoreLable
.
layer
.
frame
=
gradientLayer
.
bounds
scoreLable
.
layer
.
frame
=
gradientLayer
.
bounds
gradientLayer
.
mask
=
scoreLable
.
layer
gradientLayer
.
mask
=
scoreLable
.
layer
secondHoldView
.
layer
.
insertSublayer
(
gradientLayer
,
at
:
0
)
fakeView
.
layer
.
insertSublayer
(
gradientLayer
,
at
:
0
)
// secondHoldView.backgroundColor = .red//for test hjl
fenLable
.
frame
=
CGRect
(
x
:
gradientLayer
.
frame
.
origin
.
x
+
width
,
y
:
gradientLayer
.
frame
.
origin
.
y
+
80
-
13
-
17
-
4
,
width
:
18
,
height
:
17
)
fenLable
.
frame
=
CGRect
(
x
:
fakeView
.
frame
.
origin
.
x
+
width
,
y
:
fakeView
.
frame
.
origin
.
y
+
80
-
13
-
17
-
4
,
width
:
18
,
height
:
17
)
}
}
...
...
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