![](/img/trans.png)
[英]UIImagePickerControllerSourceTypePhotoLibrary in iOS 7 is not Working
[英]if UIImagePickerControllerSourceTypePhotoLibrary allowsediting NO
當我在相機上使用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];
}
但是,如果我嘗試將其放在照片庫中,仍然會獲得allowEditing YES。
不工作:
if( [UIImagePickerController UIImagePickerControllerSourceTypePhotoLibrary])
{
if(imagePicker == nil) imagePicker = [[UIImagePickerController alloc] init];
imagePicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
imagePicker.allowsEditing = NO;
[self presentViewController:imagePicker animated:YES completion:nil];
}
有任何想法嗎?
picker.allowsEditing = YES;
picker.delegate = self;
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.