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

Can't make zoom #11

Open
aluco100 opened this issue Sep 6, 2020 · 3 comments
Open

Can't make zoom #11

aluco100 opened this issue Sep 6, 2020 · 3 comments

Comments

@aluco100
Copy link

aluco100 commented Sep 6, 2020

Hello there,

I'm trying to make zoom in my cropper view controller. But it still in the normal size. What could be happening?

Best Regards

@BBTMathison
Copy link

HI, me too - I see can run through debug and I see the following method is called, but nothing happens:

func setImageFrame(_ frame: CGRect) {
imgCropping.frame = frame
}

@jameswilddev
Copy link

(related PR #12)

@eslammoemen
Copy link

eslammoemen commented Oct 10, 2023

the problem is image is updating its frame in layoutSubViews with its original Frame so the solution is to make Bool variable and set it to false then make init first time and set it to true meanwhile in your code check if its not first time don't update frame with its original frame
in ImageCropperPresenter.swift
add this line of code to variables
fileprivate var isSetInitial = false
then in viewDidLayoutSubviews update with this code
if !isSetInitial { view?.setImageFrame(model.imageInitialFrame) } isSetInitial = true

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

4 participants