Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修复makeScrollViewScrollToIndex:方法在非循环下无法正常使用的问题 #691

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file modified .swift-version
100644 → 100755
Empty file.
Empty file modified Podfile
100644 → 100755
Empty file.
Empty file modified Podfile.lock
100644 → 100755
Empty file.
Empty file modified Pods/Manifest.lock
100644 → 100755
Empty file.
Empty file modified Pods/Pods.xcodeproj/project.pbxproj
100644 → 100755
Empty file.
Empty file.
Empty file.
Empty file.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Empty file modified Pods/SDWebImage/LICENSE
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/README.md
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/NSButton+WebCache.h
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/NSButton+WebCache.m
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/NSData+ImageContentType.h
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/NSData+ImageContentType.m
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/NSImage+Compatibility.h
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/NSImage+Compatibility.m
100644 → 100755
Empty file.
Empty file.
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/Private/SDAsyncBlockOperation.h
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/Private/SDAsyncBlockOperation.m
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/Private/SDImageAPNGCoderInternal.h
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/Private/SDImageAssetManager.h
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/Private/SDImageAssetManager.m
100644 → 100755
Empty file.
Empty file.
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/Private/SDImageGIFCoderInternal.h
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/Private/SDInternalMacros.h
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/Private/SDInternalMacros.m
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/Private/SDWeakProxy.h
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/Private/SDWeakProxy.m
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/Private/SDmetamacros.h
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/Private/UIColor+HexString.h
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/Private/UIColor+HexString.m
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/SDAnimatedImage.h
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/SDAnimatedImage.m
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/SDAnimatedImageRep.h
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/SDAnimatedImageRep.m
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/SDAnimatedImageView+WebCache.h
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/SDAnimatedImageView+WebCache.m
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/SDAnimatedImageView.h
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/SDAnimatedImageView.m
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/SDDiskCache.h
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/SDDiskCache.m
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/SDImageAPNGCoder.h
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/SDImageAPNGCoder.m
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/SDImageCache.h
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/SDImageCache.m
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/SDImageCacheConfig.h
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/SDImageCacheConfig.m
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/SDImageCacheDefine.h
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/SDImageCacheDefine.m
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/SDImageCachesManager.h
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/SDImageCachesManager.m
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/SDImageCoder.h
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/SDImageCoder.m
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/SDImageCoderHelper.h
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/SDImageCoderHelper.m
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/SDImageCodersManager.h
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/SDImageCodersManager.m
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/SDImageFrame.h
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/SDImageFrame.m
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/SDImageGIFCoder.h
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/SDImageGIFCoder.m
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/SDImageGraphics.h
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/SDImageGraphics.m
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/SDImageIOCoder.h
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/SDImageIOCoder.m
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/SDImageLoader.h
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/SDImageLoader.m
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/SDImageLoadersManager.h
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/SDImageLoadersManager.m
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/SDImageTransformer.h
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/SDImageTransformer.m
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/SDMemoryCache.h
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/SDMemoryCache.m
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/SDWebImageCacheKeyFilter.h
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/SDWebImageCacheKeyFilter.m
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/SDWebImageCacheSerializer.h
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/SDWebImageCacheSerializer.m
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/SDWebImageCompat.h
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/SDWebImageCompat.m
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/SDWebImageDefine.h
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/SDWebImageDefine.m
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/SDWebImageDownloader.h
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/SDWebImageDownloader.m
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/SDWebImageDownloaderConfig.h
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/SDWebImageDownloaderConfig.m
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/SDWebImageDownloaderOperation.h
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/SDWebImageDownloaderOperation.m
100644 → 100755
Empty file.
Empty file.
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/SDWebImageError.h
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/SDWebImageError.m
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/SDWebImageIndicator.h
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/SDWebImageIndicator.m
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/SDWebImageManager.h
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/SDWebImageManager.m
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/SDWebImageOperation.h
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/SDWebImagePrefetcher.h
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/SDWebImagePrefetcher.m
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/SDWebImageTransition.h
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/SDWebImageTransition.m
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/UIButton+WebCache.h
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/UIButton+WebCache.m
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/UIImage+ForceDecode.h
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/UIImage+ForceDecode.m
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/UIImage+GIF.h
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/UIImage+GIF.m
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/UIImage+MemoryCacheCost.h
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/UIImage+MemoryCacheCost.m
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/UIImage+Metadata.h
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/UIImage+Metadata.m
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/UIImage+MultiFormat.h
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/UIImage+MultiFormat.m
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/UIImage+Transform.h
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/UIImage+Transform.m
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/UIImageView+HighlightedWebCache.h
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/UIImageView+HighlightedWebCache.m
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/UIImageView+WebCache.h
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/UIImageView+WebCache.m
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/UIView+WebCache.h
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/UIView+WebCache.m
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/UIView+WebCacheOperation.h
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/SDWebImage/UIView+WebCacheOperation.m
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/WebImage/SDWebImage.h
100644 → 100755
Empty file.
Empty file modified Pods/SDWebImage/WebImage/SDWebImage.modulemap
100644 → 100755
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file modified Pods/Target Support Files/SDWebImage/SDWebImage-dummy.m
100644 → 100755
Empty file.
Empty file modified Pods/Target Support Files/SDWebImage/SDWebImage-prefix.pch
100644 → 100755
Empty file.
Empty file modified Pods/Target Support Files/SDWebImage/SDWebImage.xcconfig
100644 → 100755
Empty file.
Empty file modified README.md
100644 → 100755
Empty file.
Empty file modified SDCycleScrollView.podspec
100644 → 100755
Empty file.
Empty file modified SDCycleScrollView.xcodeproj/project.pbxproj
100644 → 100755
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>SDCycleScrollView.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>1</integer>
</dict>
</dict>
</dict>
</plist>
Empty file.
Empty file.
Empty file.
Empty file modified SDCycleScrollView.xcworkspace/contents.xcworkspacedata
100644 → 100755
Empty file.
Empty file.
Empty file.
Empty file.
Binary file not shown.
Empty file modified SDCycleScrollView/005.jpg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified SDCycleScrollView/AppDelegate.h
100644 → 100755
Empty file.
Empty file modified SDCycleScrollView/AppDelegate.m
100644 → 100755
Empty file.
Empty file modified SDCycleScrollView/Base.lproj/LaunchScreen.xib
100644 → 100755
Empty file.
Empty file modified SDCycleScrollView/CustomCollectionViewCell.h
100644 → 100755
Empty file.
Empty file modified SDCycleScrollView/CustomCollectionViewCell.m
100644 → 100755
Empty file.
Empty file modified SDCycleScrollView/DemoVC/xib的demo/DemoVCWithXib.h
100644 → 100755
Empty file.
Empty file modified SDCycleScrollView/DemoVC/xib的demo/DemoVCWithXib.m
100644 → 100755
Empty file.
Empty file modified SDCycleScrollView/DemoVC/xib的demo/DemoVCWithXib.xib
100644 → 100755
Empty file.
Empty file.
Empty file modified SDCycleScrollView/Images.xcassets/Contents.json
100644 → 100755
Empty file.
Empty file.
Empty file modified SDCycleScrollView/Images.xcassets/h6.imageset/Contents.json
100644 → 100755
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified SDCycleScrollView/Images.xcassets/h7.imageset/Contents.json
100644 → 100755
Empty file.
Empty file modified SDCycleScrollView/Images.xcassets/h7.imageset/h7.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified SDCycleScrollView/Info.plist
100644 → 100755
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@
*/
@property (nonatomic) CGSize dotSize;

@property (nonatomic, assign) CGSize pageControlSize;

@property (nonatomic, assign) CGSize currentPageControlSize;

@property (nonatomic, strong) UIColor *dotColor;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,14 @@ - (void)changeActivity:(BOOL)active atIndex:(NSInteger)index
} else if (self.dotImage && self.currentDotImage) {
UIImageView *dotView = (UIImageView *)[self.dots objectAtIndex:index];
dotView.image = (active) ? self.currentDotImage : self.dotImage;

if (self.pageControlSize.width && self.currentPageControlSize.width) {
if (dotView.image == self.currentDotImage) {
dotView.frame = CGRectMake(dotView.frame.origin.x-((self.currentPageControlSize.width - self.pageControlSize.width) * 1.0)/2, dotView.frame.origin.y, self.currentPageControlSize.width, self.currentPageControlSize.height);
}else{
dotView.frame = CGRectMake(dotView.frame.origin.x+((self.currentPageControlSize.width - self.pageControlSize.width) * 1.0)/2, dotView.frame.origin.y, self.pageControlSize.width, self.pageControlSize.height);
}
}
}
}

Expand Down Expand Up @@ -356,6 +364,8 @@ - (CGSize)dotSize
} else if (self.dotViewClass && CGSizeEqualToSize(_dotSize, CGSizeZero)) {
_dotSize = kDefaultDotSize;
return _dotSize;
}else if(self.currentPageControlSize.width && self.pageControlSize.width){
_dotSize = self.pageControlSize;
}

return _dotSize;
Expand Down
Empty file modified SDCycleScrollView/Lib/SDCycleScrollView/SDCollectionViewCell.h
100644 → 100755
Empty file.
Empty file modified SDCycleScrollView/Lib/SDCycleScrollView/SDCollectionViewCell.m
100644 → 100755
Empty file.
8 changes: 7 additions & 1 deletion SDCycleScrollView/Lib/SDCycleScrollView/SDCycleScrollView.h
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ typedef enum {
@property (nonatomic, copy) void (^itemDidScrollOperationBlock)(NSInteger currentIndex);

/** 可以调用此方法手动控制滚动到哪一个index */
- (void)makeScrollViewScrollToIndex:(NSInteger)index;
- (void)makeScrollViewScrollToIndex:(NSInteger)index animated:(BOOL)animated;

/** 解决viewWillAppear时出现时轮播图卡在一半的问题,在控制器viewWillAppear时调用此方法 */
- (void)adjustWhenControllerViewWillAppera;
Expand All @@ -148,6 +148,12 @@ typedef enum {
/** 是否显示分页控件 */
@property (nonatomic, assign) BOOL showPageControl;

/** 分页控件大小 */
@property (nonatomic, assign) CGSize pageControlSize;

/** 当前分页控件大小 */
@property (nonatomic, assign) CGSize currentPageControlSize;

/** 是否在只有一张图时隐藏pagecontrol,默认为YES */
@property(nonatomic) BOOL hidesForSinglePage;

Expand Down
34 changes: 29 additions & 5 deletions SDCycleScrollView/Lib/SDCycleScrollView/SDCycleScrollView.m
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,24 @@ - (void)setShowPageControl:(BOOL)showPageControl
_pageControl.hidden = !showPageControl;
}

- (void)setPageControlSize:(CGSize)pageControlSize {
_pageControlSize = pageControlSize;
[self setupPageControl];
if ([self.pageControl isKindOfClass:[TAPageControl class]]) {
TAPageControl *pageContol = (TAPageControl *)_pageControl;
pageContol.pageControlSize = pageControlSize;
}
}

- (void)setCurrentPageControlSize:(CGSize)currentPageControlSize {
_currentPageControlSize = currentPageControlSize;
[self setupPageControl];
if ([self.pageControl isKindOfClass:[TAPageControl class]]) {
TAPageControl *pageContol = (TAPageControl *)_pageControl;
pageContol.currentPageControlSize = currentPageControlSize;
}
}

- (void)setCurrentPageDotColor:(UIColor *)currentPageDotColor
{
_currentPageDotColor = currentPageDotColor;
Expand Down Expand Up @@ -397,6 +415,8 @@ - (void)setupPageControl
pageControl.dotColor = self.currentPageDotColor;
pageControl.userInteractionEnabled = NO;
pageControl.currentPage = indexOnPageControl;
pageControl.currentPageControlSize = self.currentPageControlSize;
pageControl.pageControlSize = self.pageControlSize;
[self addSubview:pageControl];
_pageControl = pageControl;
}
Expand Down Expand Up @@ -434,10 +454,10 @@ - (void)automaticScroll
if (0 == _totalItemsCount) return;
int currentIndex = [self currentIndex];
int targetIndex = currentIndex + 1;
[self scrollToIndex:targetIndex];
[self scrollToIndex:targetIndex animated:YES];
}

- (void)scrollToIndex:(int)targetIndex
- (void)scrollToIndex:(int)targetIndex animated:(BOOL)animated
{
if (targetIndex >= _totalItemsCount) {
if (self.infiniteLoop) {
Expand All @@ -446,7 +466,7 @@ - (void)scrollToIndex:(int)targetIndex
}
return;
}
[_mainView scrollToItemAtIndexPath:[NSIndexPath indexPathForItem:targetIndex inSection:0] atScrollPosition:UICollectionViewScrollPositionNone animated:YES];
[_mainView scrollToItemAtIndexPath:[NSIndexPath indexPathForItem:targetIndex inSection:0] atScrollPosition:UICollectionViewScrollPositionNone animated:animated];
}

- (int)currentIndex
Expand Down Expand Up @@ -684,13 +704,17 @@ - (void)scrollViewDidEndScrollingAnimation:(UIScrollView *)scrollView
}
}

- (void)makeScrollViewScrollToIndex:(NSInteger)index{
- (void)makeScrollViewScrollToIndex:(NSInteger)index animated:(BOOL)animated {
if (self.autoScroll) {
[self invalidateTimer];
}
if (0 == _totalItemsCount) return;

[self scrollToIndex:(int)(_totalItemsCount * 0.5 + index)];
if (self.infiniteLoop) {
[self scrollToIndex:(int)(_totalItemsCount * 0.5 + index) animated:animated];
}else {
[self scrollToIndex:(int)index animated:animated];
}

if (self.autoScroll) {
[self setupTimer];
Expand Down
Empty file modified SDCycleScrollView/Lib/SDCycleScrollView/UIView+SDExtension.h
100644 → 100755
Empty file.
Empty file modified SDCycleScrollView/Lib/SDCycleScrollView/UIView+SDExtension.m
100644 → 100755
Empty file.
Empty file modified SDCycleScrollView/ViewController.h
100644 → 100755
Empty file.
Empty file modified SDCycleScrollView/ViewController.m
100644 → 100755
Empty file.
Empty file modified SDCycleScrollView/h1.jpg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified SDCycleScrollView/h2.jpg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified SDCycleScrollView/h3.jpg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified SDCycleScrollView/h4.jpg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified SDCycleScrollView/main.m
100644 → 100755
Empty file.
Empty file modified SDCycleScrollView/[email protected]
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified SDCycleScrollView/[email protected]
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified SDCycleScrollView/[email protected]
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified SDCycleScrollView/[email protected]
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified SDCycleScrollView/[email protected]
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified SDCycleScrollViewTests/Info.plist
100644 → 100755
Empty file.
Empty file modified SDCycleScrollViewTests/SDCycleScrollViewTests.m
100644 → 100755
Empty file.
Empty file modified qrcode_for_gh_a69e5c4e13c4_430.jpg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.