我编写代码来打开位于的 pdf 文件
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory , NSUserDomainMask, YES);
NSString *documentsDir = [paths objectAtIndex:0];
NSString *pdfFilePath =[documentsDir stringByAppendingPathComponent:@"421_core_animation_essentials.pdf"];
fileURL = [NSURL URLWithString:pdfFilePath];
QLPreviewController *previewController = [[QLPreviewController alloc] init];
previewController.dataSource = self;
[[self navigationController] pushViewController:previewController animated:YES];
[previewController.navigationItem setRightBarButtonItem:nil];
[previewController release];
它在模拟器中测试时工作,但在 iPad 设备中测试时它不起作用。请帮我。