Open dragab opened 7 years ago
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; }
Sorry, i was busy with something recently. The reason is I should not use Singleton for SRImageManager, I have fixed it. Thanks for finding the bug.
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; }