1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-15 07:43:37 +00:00

support ipad for actionviewcontroller presentation on app extension page

This commit is contained in:
Kyle Spearrin
2016-07-10 01:15:59 -04:00
parent 4cb9488ee7
commit f2ed6a4d33
3 changed files with 2840 additions and 3187 deletions

View File

@@ -64,8 +64,16 @@ namespace Bit.iOS
page.EnabledExtension(completed && activityType == "com.8bit.bitwarden.find-login-action-extension");
};
UIApplication.SharedApplication.KeyWindow.RootViewController.ModalViewController
.PresentViewController(activityViewController, true, null);
var modal = UIApplication.SharedApplication.KeyWindow.RootViewController.ModalViewController;
if(activityViewController.PopoverPresentationController != null)
{
activityViewController.PopoverPresentationController.SourceView = modal.View;
var frame = UIScreen.MainScreen.Bounds;
frame.Height /= 2;
activityViewController.PopoverPresentationController.SourceRect = frame;
}
modal.PresentViewController(activityViewController, true, null);
});
return base.FinishedLaunching(app, options);