Open nalogowiec opened 7 years ago
I'm interested too!
I need it too. Thanks.
Me 3..... aspect ratio...... of the cropper ....
Did you find any solution?
Any solution for locking the aspect ratio ?
I had to modify the library code. I added two vars: ratioX and ratioY in AKImageCropperOverlatView.swift file, I changed the method touchesMoved in this class, and added the method fixedRatio(ratioX:CGFloat,ratioY:CGFloat) for set vars, I had to change some methods in AKImageCropperView.swift from fileprivate to open. These changes worked for my requeriments project. I hope to help. Thanks. My example implementation was:
override func viewDidLoad() { navigationController?.isNavigationBarHidden = true cropViewOutlet.image = image cropViewOutlet.delegate = self; cropViewOutlet.overlayView?.cropRect.origin.y = 100 cropViewOutlet.showOverlayView(animationDuration: 0.3) cropViewOutlet.overlayView?.fixedRatio(ratioX: 6, ratioY: 5) }
I also need it
Is there a way of locking aspect ration of cropper, e.g. to 2:3 or 9:16?