我在设备上运行我的应用程序时遇到以下错误(我没有在模拟器中运行它):
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];
}