0
응용 프로그램에서 iBooks로 pdf 파일을 열 수 있습니까?iBook을 열려면 응용 프로그램을 실행 한 다음이 pdf/pub 파일을 한 번에 바로 엽니 다.
또는
어떤 타사 솔루션
, 즉 어떤 pdf 파일을 사용하고 응용 프로그램 자체가 플립 책 일을 만들 수 있습니다.응용 프로그램에서 iBooks로 pdf 파일을 열 수 있습니까?iBook을 열려면 응용 프로그램을 실행 한 다음이 pdf/pub 파일을 한 번에 바로 엽니 다.
또는
어떤 타사 솔루션
, 즉 어떤 pdf 파일을 사용하고 응용 프로그램 자체가 플립 책 일을 만들 수 있습니다.실제로 앱에서 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
가 설치된 모든 PDF 수있는 응용 프로그램의 선택과 팝 오버 (아이 패드) 또는 (아이폰) 액션 시트를 엽니 다 사용할 수 있습니다 장치에서 사용자가 원하는 PDF 파일을 선택하여 PDF를 읽을 수 있습니다.
는 오히려 그 중 하나, 응용 프로그램을 전환 할 필요없이 앱에서 직접 PDF를 여는 데 사용할 수 있습니다 또한 몇 가지 괜찮은 PDF 리더 라이브러리가 있습니다 VFR PDF Reader/Viewer for iOS