Skip to content

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

@omaarr90

Description

@omaarr90

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.

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