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
f7329d56
Commit
f7329d56
authored
May 17, 2024
by
Steven杜宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
// 刷新组件
parent
5857ba09
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
8 deletions
+13
-8
YHHomePageViewController.swift
...Classes/Modules/Home(首页)/C/YHHomePageViewController.swift
+1
-1
YHHomeHeadView.swift
...xy/galaxy/Classes/Modules/Home(首页)/V/YHHomeHeadView.swift
+2
-2
YHRefreshHeaderAnimator.swift
...s/Tools/CustomRefreshHeader/YHRefreshHeaderAnimator.swift
+10
-5
No files found.
galaxy/galaxy/Classes/Modules/Home(首页)/C/YHHomePageViewController.swift
View file @
f7329d56
...
@@ -146,7 +146,7 @@ private extension YHHomePageViewController {
...
@@ -146,7 +146,7 @@ private extension YHHomePageViewController {
view
.
addSubview
(
homeCollectView
)
view
.
addSubview
(
homeCollectView
)
homeCollectView
.
snp
.
makeConstraints
{
make
in
homeCollectView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
right
.
equalToSuperview
()
make
.
left
.
right
.
equalToSuperview
()
make
.
top
.
equalTo
(
searchView
.
snp
.
bottom
)
.
offset
(
6
)
make
.
top
.
equalTo
(
searchView
.
snp
.
bottom
)
.
offset
(
6
+
20
)
make
.
bottom
.
equalToSuperview
()
.
offset
(
-
k_Height_TabBar
)
make
.
bottom
.
equalToSuperview
()
.
offset
(
-
k_Height_TabBar
)
}
}
...
...
galaxy/galaxy/Classes/Modules/Home(首页)/V/YHHomeHeadView.swift
View file @
f7329d56
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
import
UIKit
import
UIKit
class
YHHomeHeadView
:
UIView
{
class
YHHomeHeadView
:
UIView
{
static
let
viewH
:
CGFloat
=
(
20
+
YHHomeBannerView
.
viewH
)
+
(
20
+
YHHkLifeAndIdView
.
viewH
)
+
(
20
+
YHHomeKingKongBlockView
.
viewH
)
+
20
+
20
+
1
static
let
viewH
:
CGFloat
=
(
YHHomeBannerView
.
viewH
)
+
(
20
+
YHHkLifeAndIdView
.
viewH
)
+
(
20
+
YHHomeKingKongBlockView
.
viewH
)
+
20
+
20
+
1
override
init
(
frame
:
CGRect
)
{
override
init
(
frame
:
CGRect
)
{
super
.
init
(
frame
:
frame
)
super
.
init
(
frame
:
frame
)
...
@@ -44,7 +44,7 @@ private extension YHHomeHeadView {
...
@@ -44,7 +44,7 @@ private extension YHHomeHeadView {
addSubview
(
homeBannerView
)
addSubview
(
homeBannerView
)
homeBannerView
.
snp
.
makeConstraints
{
make
in
homeBannerView
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalTo
(
2
0
)
make
.
top
.
equalTo
(
0
)
make
.
left
.
right
.
equalToSuperview
()
make
.
left
.
right
.
equalToSuperview
()
make
.
height
.
equalTo
(
YHHomeBannerView
.
viewH
)
make
.
height
.
equalTo
(
YHHomeBannerView
.
viewH
)
}
}
...
...
galaxy/galaxy/Classes/Tools/CustomRefreshHeader/YHRefreshHeaderAnimator.swift
View file @
f7329d56
...
@@ -22,6 +22,11 @@ class YHRefreshHeaderAnimator: UIView , ESRefreshProtocol, ESRefreshAnimatorProt
...
@@ -22,6 +22,11 @@ class YHRefreshHeaderAnimator: UIView , ESRefreshProtocol, ESRefreshAnimatorProt
static
let
logoWidth
=
62.0
static
let
logoWidth
=
62.0
static
let
logoHeight
=
23.0
static
let
logoHeight
=
23.0
static
let
tipsHeight
=
18.0
static
let
topMargin
=
17.0
static
let
bottomMargin
=
19.0
static
let
midGap
=
4.0
static
let
headerHeight
=
YHRefreshHeaderAnimator
.
topMargin
+
YHRefreshHeaderAnimator
.
logoHeight
+
YHRefreshHeaderAnimator
.
midGap
+
YHRefreshHeaderAnimator
.
tipsHeight
+
YHRefreshHeaderAnimator
.
bottomMargin
open
var
pullToRefreshDescription
=
"下拉刷新"
.
local
{
open
var
pullToRefreshDescription
=
"下拉刷新"
.
local
{
didSet
{
didSet
{
...
@@ -35,8 +40,8 @@ class YHRefreshHeaderAnimator: UIView , ESRefreshProtocol, ESRefreshAnimatorProt
...
@@ -35,8 +40,8 @@ class YHRefreshHeaderAnimator: UIView , ESRefreshProtocol, ESRefreshAnimatorProt
open
var
view
:
UIView
{
return
self
}
open
var
view
:
UIView
{
return
self
}
open
var
insets
:
UIEdgeInsets
=
UIEdgeInsets
.
zero
open
var
insets
:
UIEdgeInsets
=
UIEdgeInsets
.
zero
open
var
trigger
:
CGFloat
=
64.0
open
var
trigger
:
CGFloat
=
YHRefreshHeaderAnimator
.
headerHeight
open
var
executeIncremental
:
CGFloat
=
64.0
open
var
executeIncremental
:
CGFloat
=
YHRefreshHeaderAnimator
.
headerHeight
open
var
state
:
ESRefreshViewState
=
.
pullToRefresh
open
var
state
:
ESRefreshViewState
=
.
pullToRefresh
fileprivate
let
logoImgView
:
UIImageView
=
{
fileprivate
let
logoImgView
:
UIImageView
=
{
...
@@ -124,10 +129,10 @@ class YHRefreshHeaderAnimator: UIView , ESRefreshProtocol, ESRefreshAnimatorProt
...
@@ -124,10 +129,10 @@ class YHRefreshHeaderAnimator: UIView , ESRefreshProtocol, ESRefreshAnimatorProt
UIView
.
performWithoutAnimation
{
UIView
.
performWithoutAnimation
{
titleLabel
.
sizeToFit
()
titleLabel
.
sizeToFit
()
logoImgView
.
frame
=
CGRect
.
init
(
x
:
0
,
y
:
0
,
width
:
Self
.
logoWidth
,
height
:
Self
.
logoHeight
)
logoImgView
.
frame
=
CGRect
.
init
(
x
:
0
,
y
:
Self
.
topMargin
,
width
:
Self
.
logoWidth
,
height
:
Self
.
logoHeight
)
logoImgView
.
center
=
CGPoint
.
init
(
x
:
w
/
2.0
,
y
:
Self
.
logoHeight
/
2.0
)
logoImgView
.
center
=
CGPoint
.
init
(
x
:
w
/
2.0
,
y
:
Self
.
topMargin
+
Self
.
logoHeight
/
2.0
)
animaitonImgView
.
frame
=
logoImgView
.
frame
animaitonImgView
.
frame
=
logoImgView
.
frame
titleLabel
.
center
=
CGPoint
.
init
(
x
:
w
/
2.0
,
y
:
logoImgView
.
frame
.
maxY
+
4
+
9
)
titleLabel
.
center
=
CGPoint
.
init
(
x
:
w
/
2.0
,
y
:
logoImgView
.
frame
.
maxY
+
Self
.
midGap
+
Self
.
tipsHeight
/
2.0
)
}
}
}
}
...
...
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