【发布时间】:2014-03-05 10:12:45
【问题描述】:
iOS ImagePicker 有问题。它可以正常工作,但是当我想拍摄另一张照片时,相机会加载很长时间(第一次:1-2 秒,第二次和以后:8-10 秒)。我就是这样使用它的:
- (void)takePhoto {
_imagePicker = [UIImagePickerController new];
_imagePicker.delegate = self;
_imagePicker.sourceType = UIImagePickerControllerSourceTypeCamera;
_imagePicker.allowsEditing = NO;
[self presentViewController:_imagePicker animated:YES completion:nil];
}
这就是我获取图像的方式:
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingImage:(UIImage *)image editingInfo:(NSDictionary *)editingInfo {
[_imagePickerView.imageView setImage:image];
}
我认为没有太多地方可以容纳错误。当然我实现了协议UIImagePickerControllerDelegate和UINavigationControllerDelegate。
您有什么想法可以找出是什么原因造成的吗?
【问题讨论】:
-
看看这个question。它与您使用
imagePickerController加载的非常大的图像有关。你应该缩小它们。
标签: ios iphone uiimagepickercontroller