Skip to content

Image not zoomable due to async download of the large image #72

@jeromeDms

Description

@jeromeDms

Hi
I found an issue.

startFocusingView calls focusViewControllerForView
in the above focusViewControllerForView, the large image is loaded asynchronously as follow:
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ [self loadImageFromURL:url onImageView:viewController.mainImageView]; viewController.mainImageView.hidden = NO; });
While the image is downloading, the animation starts, at the end of the animation, the following function is called:
[self.focusViewController focusDidEndWithZoomEnabled:self.zoomEnabled];

This function calls installZoomView which calls displayImage which calls configureForImageSize which calls setMaxMinZoomScalesForCurrentBounds

BUT

If the large image (async loading) is still not loaded from the server, zooming is not possible since setMaxMinZoomScalesForCurrentBounds results in maximumZoomScale = minimumZoomScale = 1.0 (calculation done on low resolution image, since the large image is still loading)

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