IPad only: UIDocumentmentInteractionController presentPreviewAnimated is not pushed onto the navigation stack and is only displayed if the navigation controller returns from the InteractionControllerViewControllerForPreview
Hello to all
I wonder if anyone can help me here, and I believe that this may be a bug related only to the iPad (it works on the iPhone), but I wanted to get confirmation before I do this.
To get a UIDocumentInteractionController working in a navigation controller, I followed the recommended approach by returning the form of the navigation controller documentInteractionControllerViewControllerForPreview, but it does not work.
I even tried using the UIDocumentInteractionController code sample for Apple, upgrading it to iPad and, of course, the document interaction controller is displayed modally, even if I return the navigation controller from the InteractionControllerViewControllerForPreview document. However, for the iPhone, it gets on the navigation stack.
I am trying to create a splitviewcontroller based application that reads PDF files using the doc interaction controller so that the PDF will be displayed in the DetailViewController, but this only works for the QLPreviewController (and not for the Doc interaction controller).
Does anyone have a problem with this? Ive put my sample code below with an image of what I see:
Im using 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 {
This is what I see on the iPad.
I need to show it like this (same code example on iPhone)

document ios6 controller modalviewcontroller interaction
qiksand
source share