1
我有我從照片庫中選取圖像這樣空(無)的UIImage從照片庫中挑選
UIImagePickerController *pickerLibrary = [[UIImagePickerController alloc] init];
pickerLibrary.delegate = self;
pickerLibrary.allowsEditing = YES;
pickerLibrary.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
[self presentViewController:pickerLibrary animated:YES completion:NULL];
並加載我做這個圖片的
- (void) imagePickerController:(UIImagePickerController *)pickerLibrary didFinishPickingImage:(UIImage *)image editingInfo:(NSDictionary *)editingInfo
{
NSLog(@"picked image: %@", image);
self.img = image;
}
它會導致以下錯誤
Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer position contains NaN: [160 nan]'
我一直很看好,但未能找到任何解決我的問題。想法?可能......很簡單?