Commit d85a8446 authored by lufei's avatar lufei

feature:

1.添加pageWillShow回调
2.添加pageShow回调
3.支持外部修改frame,同时调整子view frame
3.优化代码逻辑
parent 21af5c1c
......@@ -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.
......
......@@ -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
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment