-(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就可以了。我的代码出了什么问题?
答案 0 :(得分:0)
而不是[self dismissModalViewControllerAnimated:YES];
使用[picker dismissModalViewControllerAnimated:YES];