0
-(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 就可以了。我的代码有什么问题?

4

1 回答 1

0

代替[self dismissModalViewControllerAnimated:YES];

利用[picker dismissModalViewControllerAnimated:YES];

于 2013-03-01T05:43:19.243 回答