Reputation: 1
We have to let the user open the photo album, pick an image, and edit it . So using the picker, i can see all the user albums, than when enter an album i can see the images, than, when tapping an image, i get the delegate .
Why i don't see the check sign when choosing an image ? its unclear that you actually pick it. can you also pick more than one, or is it still disabled ?
I can't edit the selected image, after i pick it, i got the delegate called, but i don't have the editing button anywhere .
UIImagePickerController *pickerLibrary = [[UIImagePickerController alloc] init]; pickerLibrary.sourceType = UIImagePickerControllerSourceTypePhotoLibrary; pickerLibrary.delegate = self; pickerLibrary.editing=YES; [self presentViewController:pickerLibrary animated:YES completion:nil]; -(void)imagePickerController: (UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info { NSString *mediaType = info[UIImagePickerControllerMediaType]; if ([mediaType isEqualToString:(NSString *)kUTTypeImage]) { UIImage *image = info[UIImagePickerControllerOriginalImage]; UIImage *imageE = info[UIImagePickerControllerEditedImage]; NSLog(@"%@",image); NSLog(@"%@",imageE); } else if ([mediaType isEqualToString:(NSString *)kUTTypeMovie]) { // Media is a video } // Code here to work with media [self dismissViewControllerAnimated:YES completion:nil]; }
Upvotes: 0
Views: 40
Reputation: 1
Ok , answer is this :
pickerLibrary.allowsEditing=YES;
and not isEditing
Upvotes: 0