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
10e976d5
Commit
10e976d5
authored
Jun 27, 2024
by
Steven杜宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
// 动画优化
parent
20b894c4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
10 deletions
+19
-10
YHMatchResultListViewController.swift
...les/Community(社区)/C/YHMatchResultListViewController.swift
+19
-10
No files found.
galaxy/galaxy/Classes/Modules/Community(社区)/C/YHMatchResultListViewController.swift
View file @
10e976d5
...
...
@@ -284,17 +284,12 @@ class YHMatchResultListViewController: YHBaseViewController {
func
animaiton
()
{
if
self
.
matchUsersArr
.
count
<=
0
{
return
}
let
view3
=
YHNameCardInfoView
.
createCardView
()
view3
.
backgroundColor
=
UIColor
.
init
(
hex
:
0xC4CEE3
)
view3
.
y
=
-
YHNameCardInfoView
.
height
view3
.
x
=
36
+
10
view3
.
width
=
YHNameCardInfoView
.
width
-
5*
4
view3
.
isHidden
=
self
.
matchUsersArr
.
count
>=
3
view3
.
isHidden
=
self
.
matchUsersArr
.
count
<
3
if
self
.
matchUsersArr
.
count
>=
3
{
if
let
user
=
self
.
matchUsersArr
[
2
]
{
view3
.
userModel
=
user
...
...
@@ -307,7 +302,7 @@ class YHMatchResultListViewController: YHBaseViewController {
view2
.
y
=
-
YHNameCardInfoView
.
height
view2
.
x
=
36
+
5
view2
.
width
=
YHNameCardInfoView
.
width
-
5*
2
view2
.
isHidden
=
self
.
matchUsersArr
.
count
>=
2
view2
.
isHidden
=
self
.
matchUsersArr
.
count
<
2
self
.
view
.
addSubview
(
view2
)
if
self
.
matchUsersArr
.
count
>=
2
{
if
let
user
=
self
.
matchUsersArr
[
1
]
{
...
...
@@ -318,28 +313,42 @@ class YHMatchResultListViewController: YHBaseViewController {
let
view1
=
YHNameCardInfoView
.
createCardView
()
view1
.
y
=
-
YHNameCardInfoView
.
height
view1
.
x
=
36
view1
.
width
=
YHNameCardInfoView
.
width
self
.
view
.
addSubview
(
view1
)
if
self
.
matchUsersArr
.
count
>=
0
{
if
let
user
=
self
.
matchUsersArr
[
0
]
{
view1
.
userModel
=
user
}
}
var
delay1Time
=
0.2
if
self
.
matchUsersArr
.
count
>=
3
{
delay1Time
=
0.2
}
else
if
self
.
matchUsersArr
.
count
>=
2
{
delay1Time
=
0.1
}
else
if
self
.
matchUsersArr
.
count
>=
1
{
delay1Time
=
0.0
}
let
delay2Time
=
delay1Time
-
0.1
>=
0.0
?
delay1Time
-
0.1
:
0.0
let
delay3Time
=
delay2Time
-
0.1
>=
0.0
?
delay2Time
-
0.1
:
0.0
UIView
.
animate
(
withDuration
:
0.5
,
delay
:
0
,
options
:
[
.
curveEaseInOut
])
{
UIView
.
animate
(
withDuration
:
0.5
,
delay
:
delay3Time
,
options
:
[
.
curveEaseInOut
])
{
view3
.
y
=
102
+
k_Height_NavigationtBarAndStatuBar
+
5*
2
}
completion
:
{
finish
in
}
UIView
.
animate
(
withDuration
:
0.5
,
delay
:
0.1
,
options
:
[
.
curveEaseInOut
])
{
UIView
.
animate
(
withDuration
:
0.5
,
delay
:
delay2Time
,
options
:
[
.
curveEaseInOut
])
{
view2
.
y
=
102
+
k_Height_NavigationtBarAndStatuBar
+
5
}
completion
:
{
finish
in
}
UIView
.
animate
(
withDuration
:
0.5
,
delay
:
0.1
,
options
:
[
.
curveEaseInOut
])
{
UIView
.
animate
(
withDuration
:
0.5
,
delay
:
delay1Time
,
options
:
[
.
curveEaseInOut
])
{
view1
.
y
=
102
+
k_Height_NavigationtBarAndStatuBar
}
completion
:
{
[
weak
self
]
finish
in
guard
let
self
=
self
else
{
return
}
self
.
cardContainer
.
isHidden
=
false
self
.
guideView
.
isHidden
=
false
self
.
view
.
bringSubviewToFront
(
self
.
guideView
)
view1
.
removeFromSuperview
()
view2
.
removeFromSuperview
()
view3
.
removeFromSuperview
()
...
...
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