From 1113fe1fd2d12a50c1e21634923674243104d0b5 Mon Sep 17 00:00:00 2001 From: Jon Date: Fri, 4 Sep 2015 21:52:19 -0400 Subject: [PATCH] Random cleanup --- ShareExample/iOS/AppDelegate.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ShareExample/iOS/AppDelegate.cs b/ShareExample/iOS/AppDelegate.cs index ed0df28..b0ef574 100644 --- a/ShareExample/iOS/AppDelegate.cs +++ b/ShareExample/iOS/AppDelegate.cs @@ -2,12 +2,11 @@ using UIKit; using Xamarin.Forms; using Xamarin.Forms.Platform.iOS; -using System.Threading.Tasks; namespace ShareExample.iOS { [Register("AppDelegate")] - public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate + public partial class AppDelegate : FormsApplicationDelegate { public override bool FinishedLaunching(UIApplication app, NSDictionary options) { @@ -35,9 +34,11 @@ async void Share (ImageSource imageSource) var activityController = new UIActivityViewController (activityItems, null); var topController = UIApplication.SharedApplication.KeyWindow.RootViewController; + while (topController.PresentedViewController != null) { topController = topController.PresentedViewController; } + topController.PresentViewController (activityController, true, () => {}); } }