简体   繁体   中英

UIImagePickerController hide square selection in allowsEditing

I would like to display a UIImagePickerController with the allowsEditing property set to true , since that gives you a nice view of the photo that you took with the ability to "Retake" or "Use Photo".
However, I don't want the user to be able to crop the image, so it makes sense to somehow hide that square overlay in that view.
I'm attaching a screenshot for clarification.

UIImagePickerController is a simple-minded lazy way to supply an image-capturing interface. If you adopt it, you must simply accept that. Either you buy into UIImagePickerController for capturing an image or you don't. If you do, you must accept its limitations.

You can turn off allowsEditing and roll your own interface by removing the default controls and supplying new ones, and you can even push your own secondary interface onto the picker controller (because it is a navigation controller); but you cannot turn on allowsEditing and then struggle against the interface that it gives you.

On the other hand, if you're willing to do a little work — that is, if you don't buy into UIImagePickerController — then you simply use AVFoundation to take the photo and build your own interface completely from scratch. Now you can have any interface you like.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM