You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 29, 2022. It is now read-only.
I admit that I haven't tried setting self?.picker to DZNPhotoPickerController(), mainly because I'm not entirely sure which methods I need to override for the delegate. Unless I have to use this class to get the square picture, however, I'm happy with using UIImagePickerController and just cropping the picture. This line self?.picker?.cropMode = DZNPhotoEditorViewControllerCropMode.square does not work as expected and I still get rectangular pictures. How do I change my code so I get square pictures?
Thanks,
Sean
The text was updated successfully, but these errors were encountered:
Okay, I solved this problem. My new problem is, how to make the size of the square be the width of the screen while also increasing the height to be the same height as the width? When I try self?.picker?.cropSize = CGSize(width: 700, height 700) it does make the picture to be almost the width of the screen, but the height stays the same as it was before I lengthened the width, giving me a long rectangle in the middle of the screen. Thanks for your consideration of this matter.
Sincerely,
Sean
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi,
I'm trying to use your library so that I can crop pictures that are in the photo library to a square. My code:
self?.picker = UIImagePickerController()
//self?.picker = DZNPhotoPickerController()
self?.picker?.delegate = self
self?.picker?.sourceType = .photoLibrary
//self?.picker.allowsEditing = true
self?.picker?.cropMode = DZNPhotoEditorViewControllerCropMode.square
//self?.picker.cropSize = CGSize(width: 200, height: 200)
self?.present((self?.picker)!, animated: true, completion: nil)
I admit that I haven't tried setting self?.picker to DZNPhotoPickerController(), mainly because I'm not entirely sure which methods I need to override for the delegate. Unless I have to use this class to get the square picture, however, I'm happy with using UIImagePickerController and just cropping the picture. This line self?.picker?.cropMode = DZNPhotoEditorViewControllerCropMode.square does not work as expected and I still get rectangular pictures. How do I change my code so I get square pictures?
Thanks,
Sean
The text was updated successfully, but these errors were encountered: