3

Hi I am currently working with UIImagePickerController and it is cropping images squared by default. Is there a way that I can make it crop at a 16:9 aspect ratio? I have searched online but haven't found much results.

Bob
  • 741
  • 2
  • 9
  • 18
  • 2
    Please look this one https://github.com/TimOliver/TOCropViewController – Bhupat Bheda Apr 24 '17 at 06:15
  • Possible duplicate of [change UIImagePicker aspect ratio](http://stackoverflow.com/questions/22592903/change-uiimagepicker-aspect-ratio) – nayem Apr 24 '17 at 06:21
  • http://stackoverflow.com/questions/36905156/how-to-convert-objective-c-tocropviewcontroller-delegate-method-in-swift/36905543#36905543 – Jayesh Miruliya Apr 24 '17 at 06:52
  • Possible duplicate of [UIImage: Resize, then Crop](https://stackoverflow.com/questions/603907/uiimage-resize-then-crop) – maddie Feb 01 '18 at 05:09
  • @BhupatBheda absolute fine controller thank you three thousand times :) – Vivek May 22 '19 at 10:16

1 Answers1

0

Try this one GithubLink

let cropVC = ShittyImageCropVC(frame: (self.navigationController?.view.frame)!, image: imageToCrop, aspectWidth: 16, aspectHeight: 9)
self.navigationController?.present(cropVC, animated: true, completion: nil)
Bhupat Bheda
  • 1,968
  • 1
  • 8
  • 13