UIWebView는 이러한 종류의 파일을 표시하는 가장 좋은 방법입니다.
또는이 코드와 함께 다른 응용 프로그램에서 문서를 읽으려고 시도 할 수 있습니다 제안에 대한
UIDocumentInteractionController *interactionController = [[UIDocumentInteractionController interactionControllerWithURL:document.documentURL] retain];
interactionController.delegate = self;
BOOL canOpenDocument = [interactionController presentOpenInMenuFromRect:CGRectMake(365, 200, 300, 400) inView:self.view animated:YES];
if(!canOpenDocument) {
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"" message:@"Your phone can't read this kind of file, please install an app from appstore for that" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil, nil];
[alert show];
[alert release];
}
감사합니다. 나는이 기회를 주었지만 컨트롤러가 시작될 때 아무 것도 안보이 경고를 받았다 : "경고 : /Developer/Platforms/iPhoneOS.platform/DeviceSupport/5.0 (9A334)/Symbols/System/Library에 대한 기호를 읽을 수 없다. /Frameworks/QuickLook.framework/DisplayBundles/Image.qldisplay/Image (파일을 찾을 수 없습니다.) 경고 : 원격 장치의 메모리에서 읽는 Image.qldisplay/Image의 복사본이 없습니다. 디버그 세션 속도가 느려질 수 있습니다. " 어떤 제안? – user1007895
@user : https://github.com/mattneub/Programming-iOS-4-Book-Examples/tree/master/p736p754fileHandoff에서의 작업 예제 – matt
@matt 링크가 이동 했으므로 이제 올바른 링크 : [https ://github.com/mattneub/Programming-iOS-Book-Examples](https://github.com/mattneub/Programming-iOS-Book-Examples). – zaph