diff --git a/SDCycleScrollView.podspec b/SDCycleScrollView.podspec index 83a3da7c..3b1940e1 100644 --- a/SDCycleScrollView.podspec +++ b/SDCycleScrollView.podspec @@ -2,8 +2,8 @@ Pod::Spec.new do |s| s.name = "SDCycleScrollView" -s.version = "1.62" -s.summary = "简单易用的图片无限轮播器. 1.62版本升级内容:增加垂直滚动接口;修复部分bug" +s.version = "1.63" +s.summary = "简单易用的图片无限轮播器. 1.63版本修复内容:修复自定义图片的pagecontrol刷新图片数据时崩溃bug;设置单张图片时停止轮播" s.homepage = "https://github.com/gsdios/SDCycleScrollView" @@ -15,7 +15,7 @@ s.platform = :ios s.platform = :ios, "7.0" -s.source = { :git => "https://github.com/gsdios/SDCycleScrollView.git", :tag => "1.62"} +s.source = { :git => "https://github.com/gsdios/SDCycleScrollView.git", :tag => "1.63"} s.source_files = "SDCycleScrollView/Lib/SDCycleScrollView/**/*.{h,m}" diff --git a/SDCycleScrollView.xcodeproj/project.xcworkspace/xcuserdata/gsd.xcuserdatad/UserInterfaceState.xcuserstate b/SDCycleScrollView.xcodeproj/project.xcworkspace/xcuserdata/gsd.xcuserdatad/UserInterfaceState.xcuserstate index baeecc52..06b3b467 100644 Binary files a/SDCycleScrollView.xcodeproj/project.xcworkspace/xcuserdata/gsd.xcuserdatad/UserInterfaceState.xcuserstate and b/SDCycleScrollView.xcodeproj/project.xcworkspace/xcuserdata/gsd.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/SDCycleScrollView/Lib/SDCycleScrollView/SDCycleScrollView.h b/SDCycleScrollView/Lib/SDCycleScrollView/SDCycleScrollView.h index 1e8556a9..782c3deb 100644 --- a/SDCycleScrollView/Lib/SDCycleScrollView/SDCycleScrollView.h +++ b/SDCycleScrollView/Lib/SDCycleScrollView/SDCycleScrollView.h @@ -108,9 +108,12 @@ typedef enum { @property (nonatomic, weak) id delegate; -/** block监听点击方式 */ +/** block方式监听点击 */ @property (nonatomic, copy) void (^clickItemOperationBlock)(NSInteger currentIndex); +/** block方式监听滚动 */ +@property (nonatomic, copy) void (^itemDidScrollOperationBlock)(NSInteger currentIndex); + ////////////////////// 自定义样式接口 ////////////////////// diff --git a/SDCycleScrollView/Lib/SDCycleScrollView/SDCycleScrollView.m b/SDCycleScrollView/Lib/SDCycleScrollView/SDCycleScrollView.m index 0d529832..ec0c0e3b 100644 --- a/SDCycleScrollView/Lib/SDCycleScrollView/SDCycleScrollView.m +++ b/SDCycleScrollView/Lib/SDCycleScrollView/SDCycleScrollView.m @@ -592,6 +592,10 @@ - (void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL if (self.autoScroll) { [self setupTimer]; } +} + +- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView +{ [self scrollViewDidEndScrollingAnimation:self.mainView]; } @@ -603,6 +607,8 @@ - (void)scrollViewDidEndScrollingAnimation:(UIScrollView *)scrollView if ([self.delegate respondsToSelector:@selector(cycleScrollView:didScrollToIndex:)]) { [self.delegate cycleScrollView:self didScrollToIndex:indexOnPageControl]; + } else if (self.itemDidScrollOperationBlock) { + self.itemDidScrollOperationBlock(indexOnPageControl); } }