3
在之前的iOS版本中,我曾經將QLPreviewController添加爲子視圖。使用我自己的應用程序標題和導航欄非常方便,但在iOS 8中,它在標題下方添加了一個空白區域。這是它自己的導航欄的空間。如何在目標C中添加QLPreviewController作爲子視圖 - iOS8
你可以看到所附IMG:
我用這個代碼:
QLPreviewController *previewController = [[QLPreviewController alloc] init];
previewController.dataSource = self;
previewController.delegate = self;
previewController.currentPreviewItemIndex = 0;
previewController.view.frame = CGRectMake(0, 0, self.containerView.frame.size.width, self.containerView.frame.size.height);
[self addChildViewController:previewController];
[previewController didMoveToParentViewController:self];
[self.containerView addSubview:previewController.view];
我如何十個分量的iOS7的funcionality?我只想隱藏qlpreviewcontroller導航欄
感謝
最後我用一個UIWebView作爲解決方法。我不喜歡它,但它適用於所有版本。除了我的應用程序不能使用自動佈局,它支持iOS 5.1.1的舊iPad – buttcmd 2014-11-10 19:26:33