From d20b3cadbfe253ab498bb941a8f82fa32137e6f0 Mon Sep 17 00:00:00 2001 From: kspearrin Date: Fri, 25 Jan 2019 08:51:10 -0500 Subject: [PATCH] fix opening file on ipad --- src/iOS/Services/DeviceActionService.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/iOS/Services/DeviceActionService.cs b/src/iOS/Services/DeviceActionService.cs index 3e5c78a56..2af983844 100644 --- a/src/iOS/Services/DeviceActionService.cs +++ b/src/iOS/Services/DeviceActionService.cs @@ -73,7 +73,9 @@ namespace Bit.iOS.Services var url = NSUrl.FromFilename(filePath); var viewer = UIDocumentInteractionController.FromUrl(url); var controller = GetVisibleViewController(); - return viewer.PresentOpenInMenu(controller.View.Frame, controller.View, true); + var rect = UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Pad ? + new CGRect(100, 5, 320, 320) : controller.View.Frame; + return viewer.PresentOpenInMenu(rect, controller.View, true); } public bool CanOpenFile(string fileName)