我嘗試使用按鈕拍攝照片後從相機保存照片。UIImageWriteToSavedPhotosAlbum問題
這裏是我的代碼:
-(IBAction)savePhoto{
UIImageWriteToSavedPhotosAlbum(img.image, 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];
[[picker parentViewController]dismissModalViewControllerAnimated:YES];
[picker release];
}
,但我不知道爲什麼犯規保存任何東西!
誰調用了'-savePhoto'? – kennytm 2010-03-27 10:45:58