0

当我在相机上使用allowEditing = NO时,它工作正常。

作品:

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

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

但是如果我尝试将它放在照片库中,我仍然会得到allowsEditing YES。

不工作:

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

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

有任何想法吗?

4

1 回答 1

1
picker.allowsEditing = YES;
picker.delegate = self;
于 2013-04-08T09:02:34.683 回答