hugocarlmartin
hugocarlmartin

Reputation: 719

if UIImagePickerControllerSourceTypePhotoLibrary allowsediting NO

When I use allowsEditing = NO on the camera it works fine.

Works:

if( [UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera])
{
  if(imagePicker == nil) imagePicker = [[UIImagePickerController alloc] init];
   imagePicker.sourceType = UIImagePickerControllerSourceTypeCamera;
   imagePicker.allowsEditing = NO;

  [self presentViewController:imagePicker animated:YES completion:nil];
}

But if I try to put it on the photo library I still get allowsEditing YES.

Don't work:

if( [UIImagePickerController UIImagePickerControllerSourceTypePhotoLibrary])
{
  if(imagePicker == nil) imagePicker = [[UIImagePickerController alloc] init];
   imagePicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
   imagePicker.allowsEditing = NO;

  [self presentViewController:imagePicker animated:YES completion:nil];
}

Any ideas?

Upvotes: 0

Views: 614

Answers (1)

Rushabh
Rushabh

Reputation: 3203

picker.allowsEditing = YES;
picker.delegate = self;

Upvotes: 1

Related Questions