Skip to content
This repository was archived by the owner on Mar 31, 2021. It is now read-only.

Conversation

@kevwkev
Copy link

@kevwkev kevwkev commented Apr 25, 2014

When zooming in and out multiple times quickly on an image in
fullscreen mode, the example application crashes intermittently.
stops at line:
"for (UIPhotoContainerView *subView in reusableViews) {" from
"UIPhotoGalleryView.m"

breakpoint analyzer:
#0 0x38dd9cc0 in objc_exception_throw ()
#1 0x2e4c99f0 in __NSFastEnumerationMutationHandler ()
#2 0x0009d61c in -[UIPhotoGalleryView scrollViewDidScroll:] at

UIPhotoGallery/UIPhotoGalleryView.m:172
#3 0x311026e4 in -UIScrollView(UIScrollViewInternal) _notifyDidScroll

When zooming in and out multiple times quickly on an image in
fullscreen mode, the example application crashes intermittently.
stops at line:
"for (UIPhotoContainerView *subView in reusableViews) {" from
"UIPhotoGalleryView.m"

breakpoint analyzer:
#0 0x38dd9cc0 in objc_exception_throw ()
#1 0x2e4c99f0 in __NSFastEnumerationMutationHandler ()
#2 0x0009d61c in -[UIPhotoGalleryView scrollViewDidScroll:] at
UIPhotoGallery/UIPhotoGalleryView.m:172
#3 0x311026e4 in -UIScrollView(UIScrollViewInternal) _notifyDidScroll
@mickey35vn
Copy link

It isn't good solution. To fix this issue, we just change the calculate of new page

int nextPage = (NSInteger)ceilf(newPage);
if (newPage > (float)currentPage) // next page
{
nextPage = (NSInteger)floorf(newPage);
}
if (nextPage != currentPage) {
currentPage = nextPage;
for (UIPhotoContainerView *subView in reusableViews) {
if (subView.tag != newPage) {
[subView resetZoom];
}
}

    [self populateSubviews];
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants