拍照后访问错误

时间:2013-03-01 05:07:47

标签: iphone xcode

-(void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
{

   //added other code

     [self dismissModalViewControllerAnimated:YES];

            UIAlertView *alert = [[UIAlertView alloc]initWithTitle:@"" message:@"Photo added to  library" delegate:self cancelButtonTitle:@"Ok" otherButtonTitles:nil, nil];
            [alert show];
}

在我的应用中拍照后显示“错误访问错误”。如果我删除Alertbox就可以了。我的代码出了什么问题?

1 个答案:

答案 0 :(得分:0)

而不是[self dismissModalViewControllerAnimated:YES];

使用[picker dismissModalViewControllerAnimated:YES];