qchenqizhi / QCropper

Image cropping/rotating/straightening library for iOS in Swift

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

I don't find the properties to set aspect ratio like the above image in our lib. Could you help me?

thuongvanbui39 opened this issue · comments

I don't find the properties to set aspect ratio like the above image in our lib. Could you help me?
Screen Shot 2021-04-12 at 09 39 21

commented

This one?

extension AspectRatioSettable where Self : QCropper.CropperViewController {

    public func setAspectRatio(_ aspectRatio: QCropper.AspectRatio)

    public func setAspectRatioValue(_ aspectRatioValue: CGFloat)
}

example:
cropper.setAspectRatio(.ratio(width: 9, height: 16))

yes, I see. but the image is selected auto-zoom to center. I want to turn off the zoom center and aspect to fit the original image.

commented

This is not supported, you can modify the relevant code yourself, this logic is mainly controlled by scrollViewZoomScaleToBounds

Yes. Many thanks for your supported.

commented

You are welcome