mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-03 20:13:02 +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 {
|
get rootController(): UIViewController {
|
||||||
if (NativeScriptEmbedder.sharedInstance().delegate && !this._window) {
|
if (NativeScriptEmbedder.sharedInstance().delegate && !this._window) {
|
||||||
this._window = UIApplication.sharedApplication.delegate.window;
|
this._window = UIApplication.sharedApplication.keyWindow;
|
||||||
}
|
}
|
||||||
return this._window.rootViewController;
|
return this._window.rootViewController;
|
||||||
}
|
}
|
||||||
@ -254,7 +254,7 @@ export class iOSApplication implements iOSApplicationDefinition {
|
|||||||
this.setWindowContent(args.root);
|
this.setWindowContent(args.root);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this._window = UIApplication.sharedApplication.delegate.window;
|
this._window = UIApplication.sharedApplication.keyWindow;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user