From 85b92b013615fee64f8b0cc9cb7f378a624f4e2f Mon Sep 17 00:00:00 2001 From: Vasil Chimev Date: Mon, 28 Oct 2019 14:10:40 +0200 Subject: [PATCH] fix-next(css-class): set class before showing window (#8022) --- nativescript-core/application/application.ios.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/nativescript-core/application/application.ios.ts b/nativescript-core/application/application.ios.ts index 06c5a37a9..13efff29b 100644 --- a/nativescript-core/application/application.ios.ts +++ b/nativescript-core/application/application.ios.ts @@ -300,14 +300,18 @@ class IOSApplication implements IOSApplicationDefinition { // setup view as styleScopeHost rootView._setupAsRootView({}); } + setViewControllerView(rootView); + const haveController = this._window.rootViewController !== null; this._window.rootViewController = controller; + + setRootViewSystemAppearanceCssClass(rootView); + if (!haveController) { this._window.makeKeyAndVisible(); } - setRootViewSystemAppearanceCssClass(rootView); rootView.on(iosView.traitCollectionColorAppearanceChangedEvent, () => { const userInterfaceStyle = controller.traitCollection.userInterfaceStyle; const newSystemAppearance = getSystemAppearanceValue(userInterfaceStyle);