4
사용자가 카메라로 사진을 찍은 후에 카메라 롤에 단추가있는 사진을 저장하려고하지만 사진이 사진 라이브러리에 저장되지 않는 이유를 모르겠습니다!UIImageWriteToSavedPhotosAlbum으로 카메라 롤에 이미지 저장 앨범
-(IBAction)savePhoto{
UIImageWriteToSavedPhotosAlbum(img.image,nil, nil, nil);
}
-(IBAction)takePic {
ipc = [[UIImagePickerController alloc]init];
ipc.delegate = self;
ipc.sourceType = UIImagePickerControllerSourceTypeCamera;
[self presentModalViewController:ipc animated:YES];
}
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info {
img.image = [[info objectForKey:UIImagePickerControllerOriginalImage]retain];
[[picker parentViewController]dismissModalViewControllerAnimated:YES];
[picker release];
}
변수 이름 ipc
이 UIImagePickerController
하고 img
가 UIIMageView
입니다 :
여기 내 코드입니다.
내 문제는 무엇입니까?