Skip to content

multiple SRinfinitecarouselview with web images crashes with index out of bounds #2

@dragab

Description

@dragab

Hi ,

i tried to use two SRinfiniteCarouselView in the same viewcontroller , they dont have the same size of arrays , it works fine in simulator , but when debuging using a mobile , i get exception index out of bounds .

the error is on the following function

  • (SRImageManager *)imageManager {

    if (!_imageManager) {
    __weak typeof(self) weakSelf = self;
    _imageManager = [SRImageManager shareManager];
    _imageManager.downloadImageSuccess = ^(UIImage *image, NSString *imageURLString, NSInteger imageIndex) {
    weakSelf.images[imageIndex] = image;
    if (weakSelf.currentIndex == imageIndex) {
    [weakSelf.currentImageView performSelectorOnMainThread:@selector(setImage:) withObject:image waitUntilDone:NO];
    }
    };
    }
    return _imageManager;
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions