2 daffodilgirl DaffodilGirl 于 2013.04.09 11:19 提问

关于UIImagePickerController问题

在照相机中使用 allowsEditing = 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];
}

各位有什么好建议么?谢谢您的解答。

Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!