1
사진을 찍어 내 앱에 저장하는 간단한 해결책이 필요한 곳에 문제가 있습니다. 그러나 지금까지 할 수있는 일은 카메라 롤에 저장하지 않고 UIImageView
에로드하는 사진을 찍는 것뿐입니다.사진을 찍어 카메라 롤에 저장
- (IBAction)takePhoto:(UIButton *)sender
{
UIImagePickerController *picker = [[UIImagePickerController alloc] init];
picker.delegate = self;
picker.allowsEditing = YES;
picker.sourceType = UIImagePickerControllerSourceTypeCamera;
[self presentViewController:picker animated:YES completion:NULL];
}
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
{
UIImage *chosenImage = info[UIImagePickerControllerEditedImage];
self.imageView.image = chosenImage;
[picker dismissViewControllerAnimated:YES completion:NULL];
}
- (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker
{
[picker dismissViewControllerAnimated:YES completion:NULL];
}
이 문제에 대한 도움을 주시면 감사하겠습니다. 나를 믿어, 나는 정말로 그것을 필요로한다.
가능한 중복 http://stackoverflow.com/questions/11131050/how-can- i-save-an-camera-roll) – klcjr89