2012-10-24 38 views
8

आईपैड में धकेल दिया नहीं है केवल: UIDocumentInteractionController presentPreviewAnimated नेविगेशन ढेर में धकेल दिया नहीं है और केवल रीति से दिखाया गया है, तब भी जब एक नेविगेशन नियंत्रक documentInteractionControllerViewControllerForPreviewसंभावित बग UIDocumentInteractionController के लिए: presentPreviewAnimated नेविगेशन ढेर

हाय से दिया जाता है सभी

मुझे आश्चर्य है कि कोई मेरी मदद कर सकता है और मुझे विश्वास है कि यह केवल आईपैड से संबंधित एक बग हो सकता है (यह आईफोन पर काम करता है) लेकिन इसे फाइल करने से पहले पुष्टि करना चाहता था।

एक नेविगेशन नियंत्रक में काम कर रहे UIDocumentInteractionController प्राप्त करने के लिए, मैंने नेविगेशन नियंत्रक फॉर्म दस्तावेज़ लौटने के द्वारा अनुशंसित दृष्टिकोण का पालन किया हैइंटरक्शन नियंत्रक दृश्य नियंत्रक फॉरप्रवेव लेकिन यह काम नहीं करता है।

मैं भी एप्पल आईपैड के लिए इसे अपग्रेड करके UIDocumentInteractionController कोड नमूना प्रदान की है और यकीन है कि पर्याप्त, दस्तावेज़ बातचीत नियंत्रक रुप से प्रदर्शित किया जाता है, भले ही मैं documentInteractionControllerViewControllerForPreview से एक नेविगेशन नियंत्रक वापसी की कोशिश की। हालांकि आईफोन के लिए, इसे नेविगेशन स्टैक में धकेल दिया जाता है।

इम एक splitviewcontroller आधारित एप्लिकेशन कि दस्तावेज़ बातचीत नियंत्रक का उपयोग, इस तरह है कि पीडीएफ DetailViewController में प्रदर्शित करेगा पीडीएफ फाइलों पढ़ता डिजाइन करने की कोशिश, लेकिन QLPreviewController के लिए यह केवल काम करता है (नहीं डॉक्टर बातचीत नियंत्रक)।

क्या किसी के पास इस समस्या है? मैंने अपने नमूना कोड को नीचे दी गई छवि के साथ नीचे रखा है:

आईओएस 6.0 एसडीके का उपयोग कर आईएम।

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]; 
} 

यह है कि मैं क्या

This is what I see on the iPad मैं इसे (iPhone पर एक ही नमूना कोड) इस तरह दिखाने के लिए

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

+0

मैंने एक साधारण नमूना प्रोजेक्ट बनाया है जो इस मुद्दे को प्रदर्शित करता है: https://github.com/kristopherjohnson/DocumentPreviewTest –

उत्तर

2

मैं एक बग प्रस्तुत की जरूरत आईपैड पर देखते हैं ऐप्पल को रिपोर्ट मेरी रिपोर्ट (http://www.openradar.me/radar?id=2785401) बग आईडी # 12567789 के डुप्लिकेट के रूप में बंद कर दी गई थी। तो जाहिर है यह एक ज्ञात मुद्दा है।

 संबंधित मुद्दे

  • कोई संबंधित समस्या नहीं^_^