iPhone SDK: Image picker allows editing question
In my app I use an image picker, and I can set the picker to allow editing, using:
self.imgPicker.allowsImageEditing = YES;
Now although this works, is there a way to customise the crop region this offers to a certain size? I've been searching around on the net for it, and I don't seem to be getting anywhere.
开发者_如何学运维Any help? Thanks.
First off, the allowsImageEditing
property is deprecated (since iOS 3.1) - you should use allowsEditing
instead.
However, to answer your question, there's no way to control the crop region that's supplied by the UIImagePickerController.
You could however create your own picker-style control that uses the Assets Library Framework to access images, etc. on the device, hence imposing your own limits and controls. (See the Assets Library Framework Reference for more information.) However, this is only available in iOS 4.0 and up and you'll need to re-invert a fairly large proportion of the wheel, so to speak.
精彩评论