nicklockwood / iCarousel

A simple, highly customisable, data-driven 3D carousel for iOS and Mac OS
http://www.charcoaldesign.co.uk/source/cocoa#icarousel
Other
12k stars 2.58k forks source link

A critical bug with (reloadData)? #616

Open gerchicov-bp opened 9 years ago

gerchicov-bp commented 9 years ago

I used your "iCarouselControlsDemo" example with the following params:

carousel.type = iCarouselTypeCoverFlow;
carousel.centerItemWhenSelected = NO;
carousel.scrollToItemBoundary = NO;
carousel.vertical = YES;




Then I added the UILongPressGestureRecognizer (near your pan and tap gesture recognizers to the same _contentView):

UILongPressGestureRecognizer *longPressGesture = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(handleLongPressGesture:)];
longPressGesture.minimumPressDuration = 0.5;
[_contentView addGestureRecognizer:longPressGesture];

In (handleLongPressGesture) I simply call (reloadData) at the beginning of the gesture:




Steps to reproduce (do not scroll the sequence!):

Expected result: all the controls are workable. Actual result: some controls will have remained disabled until you will scroll the sequence.

For example in my case: http://imglink.ru/show-image.php?id=d2d96f07e62d1e5ef748977a8ec36f0c 0 1 2 - the slider on this view works before long press, doesn't work after it and may work again on scrolling

Finally it looks like enough basic behaviour so we hope it will be fixed soon.

P.S. I my app I need to create empty space in the touch position. The easiest way I found is to keep the whole view sequence as it was before but to hide one view. If it is hard to fix this bug then maybe you may suggest me another solution?

gerchicov-bp commented 9 years ago

it seems you need to call (depthSortViews) more often but I don't confident in where it is better to add such code.