2012-10-24 3 views
8

시오로 가압하지 않는 경우에만 : UIDocumentInteractionController presentPreviewAnimated 탐색 스택에 푸시 만 탐색 컨트롤러 documentInteractionControllerViewControllerForPreview예상되는 버그 UIDocumentInteractionController 님 presentPreviewAnimated 탐색 스택

하이로 복귀되는 경우에도 모달 도시되지 모두

누구든지 나를 도울 수 있을지 궁금하다.이 문제는 내가 iPad에 관련된 버그 일 수 있다고 생각한다.

UIDocumentInteractionController가 네비게이션 컨트롤러에서 작동하도록하려면 네비게이션 컨트롤러 양식 documentInteractionControllerViewControllerForPreview를 반환하여 권장되는 방법을 따르지 만 작동하지 않습니다.

심지어 Apple이 제공 한 UIDocumentInteractionController 코드 샘플을 iPad로 업그레이드하여 시도해 보았습니다. 필자가 documentInteractionControllerViewControllerForPreview에서 내비게이션 컨트롤러를 반환하더라도 문서 상호 작용 컨트롤러가 모달로 표시됩니다. 그러나 iPhone의 경우 탐색 스택에 푸시됩니다.

PDF가 DetailViewController에 표시되도록 PDF 상호 작용 컨트롤러를 사용하여 PDF 파일을 읽는 splitviewcontroller 기반 응용 프로그램을 설계하려하지만이 방법은 Doc 상호 작용 컨트롤러가 아닌 QLPreviewController에서만 작동합니다.

누구에게 문제가 있습니까? 필자의 샘플 코드를 아래 그림의 이미지와 함께 넣으십시오 :

Im는 iOS 6.0 SDK를 사용합니다.

static NSString* documents2[] = 
{ 
    @"PDF Document.pdf" 
}; 

@implementation WhizTBViewController 

@synthesize documentURLs, docInteractionController; 

#pragma mark - 
#pragma mark View Controller 

- (void)setupDocumentControllerWithURL:(NSURL *)url 
{ 
    if (self.docInteractionController == nil) 
    { 
     self.docInteractionController = [UIDocumentInteractionController interactionControllerWithURL:url]; 
     self.docInteractionController.delegate = self; 
    } 
    else 
    { 
     self.docInteractionController.URL = url; 
    } 
} 


- (void)previewDocument { 
    // three ways to present a preview: 
    // 1. Don't implement this method and simply attach the canned gestureRecognizers to the cell 
    // 
    // 2. Don't use canned gesture recognizers and simply use UIDocumentInteractionController's 
    // presentPreviewAnimated: to get a preview for the document associated with this cell 
    // 
    // 3. Use the QLPreviewController to give the user preview access to the document associated 
    // with this cell and all the other documents as well. 
    // for case 2 use this, allowing UIDocumentInteractionController to handle the preview: 

    NSURL *fileURL; 

    fileURL = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:documents[0] ofType:nil]]; 
    [self setupDocumentControllerWithURL:fileURL]; 
    [self.docInteractionController presentPreviewAnimated:YES]; 
} 

#pragma mark - 
#pragma mark UIDocumentInteractionControllerDelegate 

- (UIViewController *)documentInteractionControllerViewControllerForPreview:(UIDocumentInteractionController *)interactionController 
{ 
    return [self navigationController]; 
} 

내가 내가 버그를 제출

I need to show it up like this (same sample code on the iPhone):

+0

문제를 보여주는 간단한 샘플 프로젝트를 만들었습니다 : https://github.com/kristopherjohnson/DocumentPreviewTest –

답변

2

같이 (아이폰 같은 샘플 코드)를 표시 할 필요가

This is what I see on the iPad 아이 패드에 표시되는 내용입니다 Apple에보고하십시오. 내 보고서 (http://www.openradar.me/radar?id=2785401)는 중복 ID # 12567789로 폐쇄되었습니다. 따라서 분명히 알려진 문제입니다.

관련 문제