一个应用程序来打开iBook,然后这个特定的PDF /酒吧文件一口气走

是否有可能从应用程序本身打开PDF文件到iBooks。

要么

任何第三方的解决scheme,可以使用任何PDF文件,并在应用程序本身创build翻转书的事情。

您确实可以从应用程序打开一个PDF文件到iBooks(或任何其他可以读取PDF文件的已安装的应用程序)。

要做到这一点,你可以使用UIDocumentInteractionController

NSString *pdfPath = @"path to your pdf file"; NSURL *url = [NSURL fileURLWithPath:pdfPath]; UIDocumentInteractionController *docController = [UIDocumentInteractionController interactionControllerWithURL:url]; docController.delegate = self; [docController retain]; // docController is released when dismissed (autorelease in the delegate method) BOOL isValid = [docController presentOpenInMenuFromRect:readPdfButton.frame inView:self.view animated:YES]; if (!isValid) { NSString * messageString = [NSString stringWithFormat:@"No PDF reader was found on your device. In order to consult the %@, please download a PDF reader (eg. iBooks).", yourPDFFileTitle]; UIAlertView * alertView = [[UIAlertView alloc] initWithTitle:@"Error" message:messageString delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil]; [alertView show]; [alertView release]; } ... // UIDocumentInteractionController delegate method - (void)documentInteractionControllerDidDismissOpenInMenu:(UIDocumentInteractionController *)controller { [controller autorelease]; } 

UIDocumentInteractionController将打开一个popup窗口(在iPad上)或一个操作表(在iPhone上),并且可以select安装在设备上的所有支持PDF的应用程序,这样用户就可以select他想要阅读PDF的最喜欢的应用程序。

还有一些体面的PDF阅读器库可以用来直接在您的应用程序中打开PDF,而不必切换应用程序,其中之一是VFR PDF Reader / Viewer for iOS