仅限iPad:UIDocumentInteractionController presentPreviewAnimated未被推入导航堆栈,即使从documentInteractionControllerViewControllerForPreview返回导航控制器时也只显示模态
大家好
我想知道是否有人可以在这里帮助我,我相信这可能是一个只与iPad有关的错误(它可以在iPhone上运行),但在我提交之前需要确认.
为了让UIDocumentInteractionController在导航控制器中工作,我按照推荐的方法返回导航控制器表单documentInteractionControllerViewControllerForPreview,但它不起作用.
我甚至尝试将Apple提供的UIDocumentInteractionController代码示例升级到iPad,果然,即使我从documentInteractionControllerViewControllerForPreview返回导航控制器,文档交互控制器也会以模态显示.但是对于iPhone来说,它确实会被推入导航堆栈.
我试图设计一个基于splitviewcontroller的应用程序,使用文档交互控制器读取PDF文件,这样PDF将显示在DetailViewController中,但这仅适用于QLPreviewController(不是Doc交互控制器).
有没有人有这个问题?我把下面的示例代码放在我看到的图像中:
我正在使用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 …Run Code Online (Sandbox Code Playgroud)