diff --git a/Pods/Pods.xcodeproj/xcuserdata/w22543.xcuserdatad/xcschemes/Pods-SDCycleScrollView.xcscheme b/Pods/Pods.xcodeproj/xcuserdata/w22543.xcuserdatad/xcschemes/Pods-SDCycleScrollView.xcscheme
new file mode 100644
index 00000000..505001d0
--- /dev/null
+++ b/Pods/Pods.xcodeproj/xcuserdata/w22543.xcuserdatad/xcschemes/Pods-SDCycleScrollView.xcscheme
@@ -0,0 +1,80 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Pods/Pods.xcodeproj/xcuserdata/w22543.xcuserdatad/xcschemes/SDWebImage.xcscheme b/Pods/Pods.xcodeproj/xcuserdata/w22543.xcuserdatad/xcschemes/SDWebImage.xcscheme
new file mode 100644
index 00000000..b8966084
--- /dev/null
+++ b/Pods/Pods.xcodeproj/xcuserdata/w22543.xcuserdatad/xcschemes/SDWebImage.xcscheme
@@ -0,0 +1,80 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Pods/Pods.xcodeproj/xcuserdata/w22543.xcuserdatad/xcschemes/xcschememanagement.plist b/Pods/Pods.xcodeproj/xcuserdata/w22543.xcuserdatad/xcschemes/xcschememanagement.plist
new file mode 100644
index 00000000..0298c881
--- /dev/null
+++ b/Pods/Pods.xcodeproj/xcuserdata/w22543.xcuserdatad/xcschemes/xcschememanagement.plist
@@ -0,0 +1,32 @@
+
+
+
+
+ SchemeUserState
+
+ Pods-SDCycleScrollView.xcscheme
+
+ orderHint
+ 1
+
+ SDWebImage.xcscheme
+
+ orderHint
+ 2
+
+
+ SuppressBuildableAutocreation
+
+ 3534881E151B75DB5D2040D8F663C85A
+
+ primary
+
+
+ 6EB15CAFDEB6B266F3F2F4538542CE37
+
+ primary
+
+
+
+
+
diff --git a/SDCycleScrollView.xcodeproj/xcuserdata/w22543.xcuserdatad/xcschemes/SDCycleScrollView.xcscheme b/SDCycleScrollView.xcodeproj/xcuserdata/w22543.xcuserdatad/xcschemes/SDCycleScrollView.xcscheme
new file mode 100644
index 00000000..f2074e38
--- /dev/null
+++ b/SDCycleScrollView.xcodeproj/xcuserdata/w22543.xcuserdatad/xcschemes/SDCycleScrollView.xcscheme
@@ -0,0 +1,101 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/SDCycleScrollView.xcodeproj/xcuserdata/w22543.xcuserdatad/xcschemes/xcschememanagement.plist b/SDCycleScrollView.xcodeproj/xcuserdata/w22543.xcuserdatad/xcschemes/xcschememanagement.plist
new file mode 100644
index 00000000..bf26e19e
--- /dev/null
+++ b/SDCycleScrollView.xcodeproj/xcuserdata/w22543.xcuserdatad/xcschemes/xcschememanagement.plist
@@ -0,0 +1,27 @@
+
+
+
+
+ SchemeUserState
+
+ SDCycleScrollView.xcscheme
+
+ orderHint
+ 0
+
+
+ SuppressBuildableAutocreation
+
+ 9900D16D1ABEB2490077A6CB
+
+ primary
+
+
+ 9900D1861ABEB2490077A6CB
+
+ primary
+
+
+
+
+
diff --git a/SDCycleScrollView.xcworkspace/xcuserdata/w22543.xcuserdatad/UserInterfaceState.xcuserstate b/SDCycleScrollView.xcworkspace/xcuserdata/w22543.xcuserdatad/UserInterfaceState.xcuserstate
new file mode 100644
index 00000000..9fe16bb3
Binary files /dev/null and b/SDCycleScrollView.xcworkspace/xcuserdata/w22543.xcuserdatad/UserInterfaceState.xcuserstate differ
diff --git a/SDCycleScrollView/Lib/SDCycleScrollView/SDCycleScrollView.m b/SDCycleScrollView/Lib/SDCycleScrollView/SDCycleScrollView.m
index 2de2c230..f6ca47b6 100644
--- a/SDCycleScrollView/Lib/SDCycleScrollView/SDCycleScrollView.m
+++ b/SDCycleScrollView/Lib/SDCycleScrollView/SDCycleScrollView.m
@@ -638,6 +638,18 @@ - (void)scrollViewDidEndScrollingAnimation:(UIScrollView *)scrollView
} else if (self.itemDidScrollOperationBlock) {
self.itemDidScrollOperationBlock(indexOnPageControl);
}
+
+ if (self.infiniteLoop) {
+ int targetIndex = itemIndex;
+ if (targetIndex == _totalItemsCount-1) {//最后一个
+ targetIndex = _totalItemsCount * 0.5 - 1;
+ }else if (targetIndex == 0){//第一个
+ targetIndex = _totalItemsCount * 0.5;
+ }else{
+ return;
+ }
+ [_mainView scrollToItemAtIndexPath:[NSIndexPath indexPathForItem:targetIndex inSection:0] atScrollPosition:UICollectionViewScrollPositionNone animated:NO];
+ }
}