我的iOS ImagePicker有問題。它工作正常,但是當我想拍攝另一張照片時,相機會加載很長時間(第一次:1-2秒,第二次和以後:8-10秒)。這是我如何使用它:ImagePicker第二次加載很長
- (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
。
你有什麼想法我怎麼才能找出是什麼原因造成的?
看看這個[問題](http://stackoverflow.com/questions/19061510/memory-warning-的UIImagePickerController-IOS-7)。它與使用'imagePickerController''加載的非常大的圖像有關。你應該縮小它們。 – damirstuhec