mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-02 19:12:40 +08:00
fix(ios): embedder usage of window (#10167)
This commit is contained in:
@ -166,7 +166,7 @@ export class iOSApplication implements iOSApplicationDefinition {
|
||||
|
||||
get rootController(): UIViewController {
|
||||
if (NativeScriptEmbedder.sharedInstance().delegate && !this._window) {
|
||||
this._window = UIApplication.sharedApplication.delegate.window;
|
||||
this._window = UIApplication.sharedApplication.keyWindow;
|
||||
}
|
||||
return this._window.rootViewController;
|
||||
}
|
||||
@ -254,7 +254,7 @@ export class iOSApplication implements iOSApplicationDefinition {
|
||||
this.setWindowContent(args.root);
|
||||
}
|
||||
} else {
|
||||
this._window = UIApplication.sharedApplication.delegate.window;
|
||||
this._window = UIApplication.sharedApplication.keyWindow;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user