ImageCropper icon indicating copy to clipboard operation
ImageCropper copied to clipboard

Can't make zoom

Open aluco100 opened this issue 4 years ago • 3 comments

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

aluco100 avatar Sep 06 '20 20:09 aluco100

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 }

BBTMathison avatar Dec 18 '20 22:12 BBTMathison

(related PR #12)

jameswilddev avatar Feb 12 '21 13:02 jameswilddev

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

eslammoemen avatar Oct 10 '23 19:10 eslammoemen