mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-18 22:01:42 +08:00
refactor: circular deps part 8
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
import { ios } from '../../utils';
|
||||
import { getWindow } from '../../utils/ios-helper';
|
||||
|
||||
class MainScreen {
|
||||
private _screen: UIScreen;
|
||||
@ -6,7 +6,7 @@ class MainScreen {
|
||||
private get screen(): UIScreen {
|
||||
if (!this._screen) {
|
||||
// NOTE: may not want to cache this value with SwiftUI app lifecycle based apps (using NativeScriptViewFactory) given the potential of multiple scenes
|
||||
const window = ios.getWindow();
|
||||
const window = getWindow() as UIWindow;
|
||||
this._screen = window ? window.screen : UIScreen.mainScreen;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user