Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
P
PhoneManager
Project
Project
Details
Activity
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Yang
PhoneManager
Commits
964b4818
Commit
964b4818
authored
Apr 30, 2025
by
CZ1004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【优化】弹窗动画
parent
b860064e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
43 additions
and
2 deletions
+43
-2
AdvTipDeleteView.swift
...r/Class/Session/Advertisement/View/AdvTipDeleteView.swift
+13
-1
AdvTipSelectView.swift
...r/Class/Session/Advertisement/View/AdvTipSelectView.swift
+11
-0
CompressSortView.swift
...anager/Class/Session/Compress/View/CompressSortView.swift
+11
-0
SecretActionView.swift
...eManager/Class/Session/Secret/View/SecretActionView.swift
+8
-1
No files found.
PhoneManager/Class/Session/Advertisement/View/AdvTipDeleteView.swift
View file @
964b4818
...
@@ -195,6 +195,17 @@ class AdvTipDeleteView : UIView {
...
@@ -195,6 +195,17 @@ class AdvTipDeleteView : UIView {
fatalError
(
"init(coder:) has not been implemented"
)
fatalError
(
"init(coder:) has not been implemented"
)
}
}
override
func
removeFromSuperview
()
{
UIView
.
animate
(
withDuration
:
0.2
)
{
// 更新约束
self
.
backgroundColor
=
.
clear
self
.
centerYConstraint
?
.
update
(
offset
:
self
.
height
+
205
)
self
.
layoutIfNeeded
()
}
completion
:
{
_
in
super
.
removeFromSuperview
()
}
}
}
}
extension
AdvTipDeleteView
:
UICollectionViewDataSource
,
UICollectionViewDelegateFlowLayout
{
extension
AdvTipDeleteView
:
UICollectionViewDataSource
,
UICollectionViewDelegateFlowLayout
{
...
@@ -268,7 +279,8 @@ extension AdvTipDeleteView : UICollectionViewDataSource, UICollectionViewDelegat
...
@@ -268,7 +279,8 @@ extension AdvTipDeleteView : UICollectionViewDataSource, UICollectionViewDelegat
// 先显示背景,然后延迟显示弹框
// 先显示背景,然后延迟显示弹框
DispatchQueue
.
main
.
asyncAfter
(
deadline
:
.
now
()
+
0.1
)
{
DispatchQueue
.
main
.
asyncAfter
(
deadline
:
.
now
()
+
0.1
)
{
UIView
.
animate
(
withDuration
:
0.1
)
{
UIView
.
animate
(
withDuration
:
0.2
)
{
// 更新约束
// 更新约束
self
.
centerYConstraint
?
.
update
(
offset
:
0
)
self
.
centerYConstraint
?
.
update
(
offset
:
0
)
self
.
layoutIfNeeded
()
self
.
layoutIfNeeded
()
...
...
PhoneManager/Class/Session/Advertisement/View/AdvTipSelectView.swift
View file @
964b4818
...
@@ -193,6 +193,17 @@ class AdvTipSelectView : UIView {
...
@@ -193,6 +193,17 @@ class AdvTipSelectView : UIView {
}
}
}
}
override
func
removeFromSuperview
()
{
UIView
.
animate
(
withDuration
:
0.2
)
{
// 更新约束
self
.
backgroundColor
=
.
clear
self
.
centerYConstraint
?
.
update
(
offset
:
self
.
height
+
220
)
self
.
layoutIfNeeded
()
}
completion
:
{
_
in
super
.
removeFromSuperview
()
}
}
}
}
extension
AdvTipSelectView
{
extension
AdvTipSelectView
{
...
...
PhoneManager/Class/Session/Compress/View/CompressSortView.swift
View file @
964b4818
...
@@ -102,6 +102,17 @@ class CompressSortView: UIView, UITableViewDelegate, UITableViewDataSource {
...
@@ -102,6 +102,17 @@ class CompressSortView: UIView, UITableViewDelegate, UITableViewDataSource {
}
}
}
}
override
func
removeFromSuperview
()
{
UIView
.
animate
(
withDuration
:
0.2
)
{
// 更新约束
self
.
backView
.
backgroundColor
=
.
clear
self
.
selectedViewBottomConstraint
?
.
update
(
offset
:
416
)
self
.
layoutIfNeeded
()
}
completion
:
{
_
in
super
.
removeFromSuperview
()
}
}
required
init
?(
coder
:
NSCoder
)
{
required
init
?(
coder
:
NSCoder
)
{
fatalError
(
"init(coder:) has not been implemented"
)
fatalError
(
"init(coder:) has not been implemented"
)
}
}
...
...
PhoneManager/Class/Session/Secret/View/SecretActionView.swift
View file @
964b4818
...
@@ -89,7 +89,14 @@ class SecretActionView: UIViewController {
...
@@ -89,7 +89,14 @@ class SecretActionView: UIViewController {
}
}
@objc
private
func
touchDismiss
(){
@objc
private
func
touchDismiss
(){
self
.
dismiss
(
animated
:
true
)
UIView
.
animate
(
withDuration
:
0.2
)
{
// 更新约束
self
.
selectedViewBottomConstraint
?
.
update
(
offset
:
1000
)
self
.
view
.
layoutIfNeeded
()
}
completion
:
{
_
in
self
.
dismiss
(
animated
:
true
)
}
}
}
...
...
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