我想裁剪在应用程序中拍摄的照片,然后保存。我正在使用 GKImagePicker 以便我可以做到这一点,但是如果我使用下面的代码,即使我在我的应用程序中按下拍照按钮,它也会向我显示我选择裁剪的照片库。我不想这样做,只想裁剪我在应用程序中拍摄的照片。
- (IBAction)takePhoto:(UIButton *)sender {
UIImagePickerController *picker = [[UIImagePickerController alloc] init];
picker.delegate = self;
self.imagePicker = [[GKImagePicker alloc] init];
self.imagePicker.cropSize = CGSizeMake(320, 320);
self.imagePicker.delegate = self;
picker.sourceType = UIImagePickerControllerSourceTypeCamera;
[self presentModalViewController:self.imagePicker.imagePickerController animated:YES];
[self presentViewController:picker animated:YES completion:NULL];
}