gpt4 book ai didi

iphone - 如果 UIImagePickerControllerSourceTypePhotoLibrary 允许编辑 NO

转载 作者:行者123 更新时间:2023-11-29 04:00:45 25 4
gpt4 key购买 nike

当我在相机上使用 allowedEditing = 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];
}

但是,如果我尝试将其放入照片库,我仍然会得到“允许编辑是”的结果。

不工作:

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;

关于iphone - 如果 UIImagePickerControllerSourceTypePhotoLibrary 允许编辑 NO,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15874980/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com