Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
DZXCarouselView
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lufei
DZXCarouselView
Commits
d85a8446
Commit
d85a8446
authored
Feb 24, 2021
by
lufei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feature:
1.添加pageWillShow回调 2.添加pageShow回调 3.支持外部修改frame,同时调整子view frame 3.优化代码逻辑
parent
21af5c1c
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
121 additions
and
36 deletions
+121
-36
DZXCarouselView.podspec
DZXCarouselView.podspec
+1
-1
DZXCarouselView/Classes/DZXCarouselView.h
DZXCarouselView/Classes/DZXCarouselView.h
+12
-1
DZXCarouselView/Classes/DZXCarouselView.m
DZXCarouselView/Classes/DZXCarouselView.m
+108
-34
No files found.
DZXCarouselView.podspec
View file @
d85a8446
...
...
@@ -8,7 +8,7 @@
Pod
::
Spec
.
new
do
|
s
|
s
.
name
=
'DZXCarouselView'
s
.
version
=
'0.0.
1
'
s
.
version
=
'0.0.
2
'
s
.
summary
=
'轮播组件'
# This description is used to generate tags and improve search results.
...
...
DZXCarouselView/Classes/DZXCarouselView.h
View file @
d85a8446
...
...
@@ -55,6 +55,8 @@ typedef NS_ENUM(NSUInteger, DZXCarouselPageControlTheme) {
@class
DZXCarouselConfig
;
typedef
void
(
^
DZXCarouselConfigBlock
)(
DZXCarouselConfig
*
carouselConfig
);
typedef
void
(
^
DZXCarouselTapBlock
)(
NSInteger
index
,
id
data
);
typedef
void
(
^
DZXCarouselPageShowBlock
)(
NSInteger
index
,
id
data
);
typedef
void
(
^
DZXCarouselPageWillShowBlock
)(
NSInteger
index
,
id
data
);
@interface
DZXCarouselConfig
:
NSObject
...
...
@@ -101,7 +103,13 @@ typedef void(^DZXCarouselTapBlock)(NSInteger index, id data);
/// @param frame frame
/// @param configBlock 配置回调
/// @param tapBlock 点击回调
-
(
instancetype
)
initWithFrame
:(
CGRect
)
frame
configBlock
:(
DZXCarouselConfigBlock
)
configBlock
tapBlock
:(
DZXCarouselTapBlock
)
tapBlock
;
/// @param pageShowBlock 页面将展示回调
/// @param pageShowBlock 页面展示回调
-
(
instancetype
)
initWithFrame
:(
CGRect
)
frame
configBlock
:(
DZXCarouselConfigBlock
)
configBlock
tapBlock
:(
DZXCarouselTapBlock
)
tapBlock
pageWillShowBlock
:(
DZXCarouselPageWillShowBlock
)
pageWillShowBlock
pageShowBlock
:(
DZXCarouselPageShowBlock
)
pageShowBlock
;
/// 开始定时器
-
(
void
)
timerStart
;
...
...
@@ -109,5 +117,8 @@ typedef void(^DZXCarouselTapBlock)(NSInteger index, id data);
/// 结束定时器
-
(
void
)
timerStop
;
/// 更新当前索引
-
(
void
)
updateCurrentIndex
:(
NSInteger
)
currentIndex
;
@end
DZXCarouselView/Classes/DZXCarouselView.m
View file @
d85a8446
This diff is collapsed.
Click to expand it.
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