How do we force UIIImagePickerController to crop a square image?
I have searched all over and I haven\'t found a solid solution. Thankyo
var imagePicker
For Swift 4
func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String : Any]) {
viewController.dismiss(animated: true, completion: { () -> Void in
if let image = info[UIImagePickerControllerEditedImage] as! UIImage {
yourUIImageView.image = image
}
})
}