Xamarin iOS 8中的QLPreviewController问题

时间:2015-02-02 09:41:10

标签: ios8 xamarin.ios xamarin qlpreviewcontroller

我在iOS 8中遇到QLPreviewcontroller演示文稿的问题。当它被推送时,UINavigationBar变得透明,应用程序的UI受到干扰(虽然它在iOS 7上工作正常),我正在开发Xamarin。 / p>

if (UIDevice.CurrentDevice.CheckSystemVersion (8, 0))
{
     DocPreviewViewController docPreivewVC = new DocPreviewViewController (this.Title, downloadedTime, fullFilePath); //DocPreviewViewController is subclass of UIViewController

     this.NavigationController.PushViewController (docPreivewVC, true);
}

以下是iOS 8中的输出: QLPreviewController when pushed in iOS 8

如果我通过打包到UINavigationContorller来尝试呈现,则文档会隐藏在QLPreviewControllers工具栏下,用户必须点击屏幕才能隐藏导航栏并查看文档的上半部分。有没有办法隐藏这个工具,只显示我自己的UINavigationBar?这是一个已知行为,QLPreviewController的导航栏始终与文档重叠,用户必须点击它以显示完整文档吗?  这是我尝试过的代码:

if (UIDevice.CurrentDevice.CheckSystemVersion (8, 0)) 
{
        DocPreviewViewController docPreivewVC = new DocPreviewViewController (this.Title, downloadedTime, fullFilePath);
        UINavigationController nav = new UINavigationController (docPreivewVC);
        nav.HidesBarsOnTap = false;
        nav.HidesBarsOnSwipe = false;
        this.PresentViewController (nav, true, null);
}

iOS 8:使用时的屏幕截图

QLPreviewController when presented

请给我一些建议如何在iOS 7中实现文档的外观,即:隐藏QLPreviewController的顶部工具栏并仅显示NavigationController的导航栏:

iOS 7 Screenshot

由于

0 个答案:

没有答案
相关问题