NNikN
NNikN

Reputation: 3850

Passing a UIIImage to UIImagePickerController for editing

Is it possible to provide UIImagePickerController a UIIMage object, to use editing functionality provide this pickerController.

This is how I am trying to implement it.

-(IBAction) openEditor:(id) sender{
    UIImagePickerController *pickerCntrl=[[UIImagePickerController alloc] init];
    pickerCntrl.sourceType=UIImagePickerControllerSourceTypeSavedPhotosAlbum;
    pickerCntrl.allowsEditing=YES;
    [self presentViewController:pickerCntrl animated:YES completion:nil];
}

But, for this Image must be already present in the Album. Another thing is it provides a UI for you to select the Image.

I am trying to open directly the following window on openEditor:(id) sender. enter image description here

Upvotes: 1

Views: 1060

Answers (1)

rmaddy
rmaddy

Reputation: 318814

The UIImagePickerController is for picking an image (either from the photo library or the camera). It can't be used for any kind of editing of any arbitrary image you wish to supply.

If you want to provide scaling and cropping of your own image then you must implement your own image editing controller.

Either implement your own or look into a 3rd party library that already does this. I've had good luck with the Aviary SDK.

Upvotes: 2

Related Questions