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
8e5c89a3
Commit
8e5c89a3
authored
Mar 28, 2024
by
David黄金龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
状态 展示
parent
947b64af
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
6 deletions
+37
-6
YHMyDocListHeaderView.swift
...ice(服务中心)/MyDocuments(我的文书)/V/YHMyDocListHeaderView.swift
+37
-6
No files found.
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MyDocuments(我的文书)/V/YHMyDocListHeaderView.swift
View file @
8e5c89a3
...
...
@@ -7,10 +7,23 @@
//
import
UIKit
enum
ClickButtonType
{
case
downAll
//全部下载
case
cancel
//取消
}
class
YHMyDocListHeaderView
:
UIView
{
static
let
viewH
:
CGFloat
=
46.0
typealias
Block
=
(
ClickButtonType
)
->
()
var
block
:
Block
?
var
curShowType
:
ClickButtonType
?
{
didSet
{
updataUI
()
}
}
override
init
(
frame
:
CGRect
)
{
super
.
init
(
frame
:
frame
)
initView
()
...
...
@@ -66,6 +79,7 @@ private extension YHMyDocListHeaderView {
titleLable
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalToSuperview
()
.
offset
(
kMargin
)
make
.
left
.
right
.
equalToSuperview
()
make
.
right
.
equalTo
(
-
80
)
make
.
height
.
equalTo
(
26
)
}
...
...
@@ -80,9 +94,6 @@ private extension YHMyDocListHeaderView {
allDownLoadButton
.
layoutIfNeeded
()
allDownLoadButton
.
addYinHeGradualLayer
()
addSubview
(
cancelButton
)
cancelButton
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalToSuperview
()
.
offset
(
19
)
...
...
@@ -91,17 +102,37 @@ private extension YHMyDocListHeaderView {
make
.
height
.
equalTo
(
24
)
}
}
//点击全部下载按钮
@objc
func
clickAllBtn
()
{
hiddenButton
(
type
:
.
downAll
)
block
?(
.
downAll
)
}
//点击取消按钮
@objc
func
clickCancelBtn
()
{
hiddenButton
(
type
:
.
cancel
)
block
?(
.
cancel
)
}
private
func
hiddenButton
(
type
:
ClickButtonType
)
{
if
type
==
.
downAll
{
allDownLoadButton
.
isHidden
=
true
cancelButton
.
isHidden
=
false
}
else
if
type
==
.
cancel
{
allDownLoadButton
.
isHidden
=
true
cancelButton
.
isHidden
=
false
}
}
func
updataUI
()
{
guard
let
type
=
curShowType
else
{
return
}
if
type
==
.
downAll
{
hiddenButton
(
type
:
.
cancel
)
}
else
if
type
==
.
cancel
{
hiddenButton
(
type
:
.
downAll
)
}
}
}
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