Closed coderxdotwang closed 5 years ago
@coderwangxx iCarousel won’t display the same item more than once in a single carousel, but you can achieve this by adding duplicate items to the carousel data source.
So in your case, if items.count is < 3 return items.count * 2 to iCarousel and return a view for items[index % items.count] in your viewForItem dataSource method.
@nicklockwood thanks for the response :)tried the exactly method as your suggestion, works fine.🍻
with wrap on, and iCarouselOptionVisibleItems/iCarouselOptionCount set to 3, but when there is only 2 items, eg. view0 view1, only 2 views are visible all the way, the expected effect is 'view1, view0, view1' are visible by default, and when scroll to index 1, then 'view0, view1, view0' are visible, is there any way to achieve this? thanks in advance