Skip to content
New issue

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

weird behaviour when image view mode is scale to fill. #48

Open
omaarr90 opened this issue May 1, 2015 · 0 comments
Open

weird behaviour when image view mode is scale to fill. #48

omaarr90 opened this issue May 1, 2015 · 0 comments

Comments

@omaarr90
Copy link

omaarr90 commented May 1, 2015

in startfocusingview:

if(imageView.contentMode == UIViewContentModeScaleAspectFill)
    {
        CGSize size;

        size = [self sizeThatFitsInSize:finalImageFrame.size initialSize:imageView.image.size];
        finalImageFrame.size = size;
        finalImageFrame.origin.x = (focusViewController.view.bounds.size.width - size.width)/2;
        finalImageFrame.origin.y = (focusViewController.view.bounds.size.height - size.height)/2;
    }

you also need to check if content mode is scale to fill. worked for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant