MCPcopy Create free account
hub / github.com/NativeScript/NativeScript / screen

Method screen

packages/core/platform/screen/index.ios.ts:6–14  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4 private _screen: UIScreen;
5
6 private get screen(): UIScreen {
7 if (!this._screen) {
8 // NOTE: may not want to cache this value with SwiftUI app lifecycle based apps (using NativeScriptViewFactory) given the potential of multiple scenes
9 const window = getWindow() as UIWindow;
10 this._screen = window ? window.screen : UIScreen.mainScreen;
11 }
12
13 return this._screen;
14 }
15
16 get widthPixels(): number {
17 return this.widthDIPs * this.scale;

Callers

nothing calls this directly

Calls 1

getWindowFunction · 0.90

Tested by

no test coverage detected