nicklockwood / iCarousel

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

icarousel stucks after two finger tap #694

Open seryukov opened 8 years ago

seryukov commented 8 years ago

When you stop carousel with two finger tap it stops where you stop it and don't scroll to currently selected item. I recorded video of problem. It is easily reproducible with single view template project.

Xcode 7.2 fresh single view project. In view controller:

@interface ViewController ()
    <iCarouselDataSource>

@property (nonatomic, weak) IBOutlet iCarousel *carousel;

@end

@implementation ViewController

- (void)viewDidLoad
{
    [super viewDidLoad];

    self.carousel.type    = iCarouselTypeCylinder;
}

- (NSInteger)numberOfItemsInCarousel:(iCarousel *)carousel
{
    return 10;
}

- (UIView *)carousel:(iCarousel *)carousel
  viewForItemAtIndex:(NSInteger)index
         reusingView:(nullable UIView *)view
{
    UIView *v = [[UIView alloc] initWithFrame: (CGRect) {CGPointZero, 100, 100}];
    v.backgroundColor = [UIColor colorWithRed:(rand() % 256) / 256.f
                                        green:(rand() % 256) / 256.f
                                         blue:(rand() % 256) / 256.f
                                        alpha:1.f];
    return v;
}

@end

Here is the video (sorry for archive). icarouseltest.zip

seryukov commented 8 years ago

Any ideas guys?

mickel917 commented 8 years ago

@seryukov Have you fixed?

seryukov commented 8 years ago

@mickel917 Nope. Maybe @nicklockwood can help us?

mickel917 commented 8 years ago

@seryukov take a look for #508, @instaable 's answer works for me

seryukov commented 8 years ago

@mickel917 Great, this fixes my issue too! Thank you for the link.