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
f3a94a43
Commit
f3a94a43
authored
May 22, 2024
by
Steven杜宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
// 解决刷新首页banner不更新
parent
522c74a0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
2 deletions
+13
-2
YHHomePageViewController.swift
...Classes/Modules/Home(首页)/C/YHHomePageViewController.swift
+1
-1
YHHomeBannerView.swift
.../galaxy/Classes/Modules/Home(首页)/V/YHHomeBannerView.swift
+12
-1
No files found.
galaxy/galaxy/Classes/Modules/Home(首页)/C/YHHomePageViewController.swift
View file @
f3a94a43
...
...
@@ -156,7 +156,7 @@ private extension YHHomePageViewController {
homeCollectView
.
contentInset
=
UIEdgeInsets
(
top
:
YHHomeHeadView
.
viewH
,
left
:
0
,
bottom
:
0
,
right
:
0
)
let
tmpHeadView
=
homeCollectView
.
es
.
addYHPullToRefresh
{
self
.
loadFirs
tData
()
self
.
ge
tData
()
}
var
r
=
tmpHeadView
.
frame
...
...
galaxy/galaxy/Classes/Modules/Home(首页)/V/YHHomeBannerView.swift
View file @
f3a94a43
...
...
@@ -10,12 +10,23 @@ import Foundation
import
FSPagerView
import
Kingfisher
let
bannerSildingInterval
=
3.0
class
YHHomeBannerView
:
UIView
{
static
let
viewH
:
CGFloat
=
KScreenWidth
-
20.0
*
2
var
dataArr
:
[
YHBannerModel
]
=
[]
{
didSet
{
// 设置为0是先停掉自动滑动定时器
bannerView
.
automaticSlidingInterval
=
0
self
.
indicatorView
.
indicatorItems
=
self
.
dataArr
.
count
bannerView
.
reloadData
()
// 指定指示器为第一个
self
.
indicatorView
.
curIndicatorIndex
=
0
// 指定显示图片为第一个
bannerView
.
selectItem
(
at
:
0
,
animated
:
false
)
// 开启定时器开始滚动
bannerView
.
automaticSlidingInterval
=
bannerSildingInterval
}
}
...
...
@@ -34,7 +45,7 @@ class YHHomeBannerView: UIView {
view
.
dataSource
=
self
view
.
bounces
=
false
view
.
isInfinite
=
true
view
.
automaticSlidingInterval
=
3
view
.
automaticSlidingInterval
=
bannerSildingInterval
view
.
register
(
YHHomeBannerCollectionViewCell
.
self
,
forCellWithReuseIdentifier
:
"cell"
)
view
.
itemSize
=
CGSizeMake
(
YHHomeBannerView
.
viewH
,
YHHomeBannerView
.
viewH
)
//FSPagerView.automaticSize
return
view
...
...
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