3

I'm using iCarousel in rotary mode. I'd like to have my views scrolled one by one in a paginated way. I've tried many settings but couldn't manage to do that.

The settings i'm looking for is a bit like "pagingEnabled" in UIScrollView, but with the addition that a swipe motion should never scroll more than one view. I tried to perform "[stop animation]" in the "carouselCurrentItemIndexDidChange" method without luck.

I first thought that stopAtItemBoundary property would let me do that, but it doesn't. I just means the carousel will stop at an item, but i lets the user swipe more than one at a time.

Anyone ?

Ben G
  • 3,965
  • 3
  • 30
  • 34
  • once set the value scrollSpeed = 0.0f; in icarosel.m – Balu Apr 08 '13 at 11:40
  • @Sunny : thanks, scrollSpeed is also a good way. But it isn't enough by itself, you may still scroll by a large swipe. All in all, i had to use a combination of scrollSpeed, decelerationRate and offsetMultiplier to ensure that the swipe never shows more than one item – Ben G Apr 08 '13 at 13:38

2 Answers2

1

set decelerationRate to a lower value like 0.5.

You may need to tweak this value to suit your view sizes, but it will have the effect of reducing the distance the carousel moves when flicked.

Nick Lockwood
  • 40,865
  • 11
  • 112
  • 103
  • Hi, i suppose you mean delerationRate ?I tried that (even set it to 0), but it doesn't work this way. You can still scroll multiple items if you swipe large enough. – Ben G Apr 08 '13 at 10:54
  • I managed to get why i wanted using a combination of decelerationRate set to very low (0.1) and iCarouselOptionOffsetMultiplier set to 0.25. Since you're the creator of that lib, would you say that's a good way ? – Ben G Apr 08 '13 at 11:11
  • It's not ideal. I intend to add a better solution at some point. – Nick Lockwood Apr 08 '13 at 23:35
  • Another option you can use is to set scrollEnabled = NO and then add a swipe gesture recogniser that will call scrollByNumberOfItems:1 duration:0.5 - also not ideal because you can't drag slowly but may be closer to the effect you are after. – Nick Lockwood Apr 08 '13 at 23:37
0

Set 'isPagingEnabled = true'. This would help

This is available in latest version of iCarousel. But it won't help in auto scroll though.

Vasanth
  • 24
  • 8