Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/Core/src/Platform/iOS/MauiUIApplicationDelegate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ namespace Microsoft.Maui
{
public class MauiUIApplicationDelegate<TApplication> : UIApplicationDelegate, IUIApplicationDelegate where TApplication : MauiApp
{
public override UIWindow? Window
{
get;
set;
}

public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
{
if (!(Activator.CreateInstance(typeof(TApplication)) is TApplication app))
Expand All @@ -32,15 +38,15 @@ public override bool FinishedLaunching(UIApplication application, NSDictionary l

var content = (window.Page as IView) ?? window.Page.View;

var uiWindow = new UIWindow
Window = new UIWindow
{
RootViewController = new UIViewController
{
View = content.ToNative(window.MauiContext)
}
};

uiWindow.MakeKeyAndVisible();
Window.MakeKeyAndVisible();

return true;
}
Expand Down