We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi,
I have faced an issue in scrolling images when we scroll very fast and scroll view offset becomes -ve, i that case app will crash
Can you please check the code?
I have fixed that in below method by adding
if(_scroller.contentOffset.x < 0) return;
(void)scrollingHasEnded {
_isScrolling = NO; if(_scroller.contentOffset.x < 0) return; NSUInteger newIndex = floor( _scroller.contentOffset.x / _scroller.frame.size.width );
// don't proceed if the user has been scrolling, but didn't really go anywhere. if( newIndex == _currentIndex ) return;
// clear previous [self unloadFullsizeImageWithIndex:_currentIndex];
_currentIndex = newIndex; [self updateCaption]; [self updateTitle]; [self updateButtons]; [self loadFullsizeImageWithIndex:_currentIndex]; [self preloadThumbnailImages]; }
If its fine then please update the code so that in future if anyone use this then should not face this issue.
Thanks
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi,
I have faced an issue in scrolling images when we scroll very fast and scroll view offset becomes -ve, i that case app will crash
Can you please check the code?
I have fixed that in below method
by adding
if(_scroller.contentOffset.x < 0)
return;
(void)scrollingHasEnded {
_isScrolling = NO;
if(_scroller.contentOffset.x < 0)
return;
NSUInteger newIndex = floor( _scroller.contentOffset.x / _scroller.frame.size.width );
// don't proceed if the user has been scrolling, but didn't really go anywhere.
if( newIndex == _currentIndex )
return;
// clear previous
[self unloadFullsizeImageWithIndex:_currentIndex];
_currentIndex = newIndex;
[self updateCaption];
[self updateTitle];
[self updateButtons];
[self loadFullsizeImageWithIndex:_currentIndex];
[self preloadThumbnailImages];
}
If its fine then please update the code so that in future if anyone use this then should not face this issue.
Thanks
The text was updated successfully, but these errors were encountered: