我在设备上运行我的应用程序时出现以下错误(我没有让它在模拟器中运行):
CGImageCreateWithImageProvider`:图像尺寸无效:180 x 180。
- (IBAction)choosePic:(id)sender {
if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) {
self.imageOne = [[UIImagePickerController alloc] init];
self.imageOne.sourceType = UIImagePickerControllerSourceTypeCamera;
self.imageOne.delegate = self;
}
if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypePhotoLibrary]) {
self.imageOne = [[UIImagePickerController alloc] init];
self.imageOne.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
self.imageOne.delegate = self;
}
[self presentViewController:self.imageOne animated:YES completion:nil];
}