Open sarahbdlrzk opened 12 years ago
Are you setting wrap by returning YES from the delegate method, or have you copied the example and set the wrap property?
I set up the iCarousel like this and I return the wrap on delegate method.
iCarousel *contentPanel = [[iCarousel alloc] initWithFrame: CGRectMake(18, 25, 1000, 333)];
contentPanel.delegate = self; contentPanel.dataSource =self; self.myContentPanel = contentPanel; [contentPanel release]; [myContentPanel setBackgroundColor:[UIColor clearColor]]; myContentPanel.type = iCarouselTypeCylinder; wrap = YES;
[self.innerModuleViews addSubview:myContentPanel];
Your shouldWrap method looks like a copy of a method from inside iCarousel itself - is that in your viewController? Why is it there?
You should add a method to your viewController called carouselShouldWrap: (look at the iOS example and copy the one from that view controller) an in it remove all the logic and just return YES.
On my view controller I'm implementing this delegate method. The views are already wrapping with me multiple times. The problems happens after some time when I'm scrolling quickly that the cylinders rotates on the opposite direction.
That's odd. Perhaps if you flick it too hard it's just getting confused and reading the swipe as the wrong direction.
Is there a way to correct swipe direction?
@sarahbdlrzk have you implemented the
@property (nonatomic, assign) BOOL ignorePerpendicularSwipes;
?
it definitely helps…
If YES, the carousel will ignore swipe gestures that are perpendicular to the orientation of the carousel. So for a horizontal carousel, vertical swipes will not be intercepted. This means that you can have a vertically scrolling scrollView inside a carousel item view and it will still function correctly. Defaults to YES.
but I think I know what you mean? i'm speaking of the mac os version, but when I alter content or viewport offsets, the NSImageViews
go berserk.. like up and down sorta… is that what you are talking about?
This is an awesome control - was so incredibly useful in adding some very powerful functionality, thanks so much
Hi Nick,
I'm using iCarousel with Cylinder type and it is working great thanks alot for this library. I'm facing an issue when scrolling between views, I have 7 views with width 560 px I'm setting wrap = YES; . The cylinder keeps moving with me and suddenly it turns and moves on the opposite direction. I would really appreciate your help. Thanks alot.