GoogleNavigation Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
GMSNavigationScreenMetrics
@protocol GMSNavigationScreenMetrics
Protocol for returning information about screen metrics.
This protocol is a subset of the screen-metric-related properties implemented by UIScreen
.
-
The bounding rectangle of the screen, measured in points.
Declaration
Swift
var bounds: CGRect { get set }
Objective-C
@property (nonatomic) CGRect bounds;
-
The bounding rectangle of the physical screen, measured in pixels.
Declaration
Swift
var nativeBounds: CGRect { get set }
Objective-C
@property (nonatomic) CGRect nativeBounds;
-
The native scale factor for the physical screen.
Declaration
Swift
var nativeScale: CGFloat { get set }
Objective-C
@property (nonatomic) CGFloat nativeScale;
-
The natural scale factor associated with the screen.
Declaration
Swift
var scale: CGFloat { get set }
Objective-C
@property (nonatomic) CGFloat scale;
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-27 UTC.
[null,null,["Last updated 2025-08-27 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eGMSNavigationScreenMetrics\u003c/code\u003e protocol provides information about screen metrics, similar to some properties of \u003ccode\u003eUIScreen\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eIt includes properties for the screen's bounding rectangle in points (\u003ccode\u003ebounds\u003c/code\u003e) and pixels (\u003ccode\u003enativeBounds\u003c/code\u003e).\u003c/p\u003e\n"],["\u003cp\u003eIt also provides the screen's native scale factor (\u003ccode\u003enativeScale\u003c/code\u003e) and natural scale factor (\u003ccode\u003escale\u003c/code\u003e).\u003c/p\u003e\n"]]],["The `GMSNavigationScreenMetrics` protocol provides screen metric information, mirroring properties found in `UIScreen`. It offers access to the screen's `bounds` and `nativeBounds`, representing the bounding rectangle in points and pixels, respectively. Additionally, it exposes `nativeScale` and `scale`, which are the physical and natural scale factors associated with the screen. These properties are accessible and modifiable via Swift and Objective-C.\n"],null,["# GoogleNavigation Framework Reference\n\nGMSNavigationScreenMetrics\n==========================\n\n @protocol GMSNavigationScreenMetrics\n\nProtocol for returning information about screen metrics.\n\nThis protocol is a subset of the screen-metric-related properties implemented by `UIScreen`.\n- `\n ``\n ``\n `\n\n ### [bounds](#/c:objc(pl)GMSNavigationScreenMetrics(py)bounds)\n\n `\n ` \n The bounding rectangle of the screen, measured in points. \n\n #### Declaration\n\n Swift \n\n var bounds: CGRect { get set }\n\n Objective-C \n\n @property (nonatomic) CGRect bounds;\n\n- `\n ``\n ``\n `\n\n ### [nativeBounds](#/c:objc(pl)GMSNavigationScreenMetrics(py)nativeBounds)\n\n `\n ` \n The bounding rectangle of the physical screen, measured in pixels. \n\n #### Declaration\n\n Swift \n\n var nativeBounds: CGRect { get set }\n\n Objective-C \n\n @property (nonatomic) CGRect nativeBounds;\n\n- `\n ``\n ``\n `\n\n ### [nativeScale](#/c:objc(pl)GMSNavigationScreenMetrics(py)nativeScale)\n\n `\n ` \n The native scale factor for the physical screen. \n\n #### Declaration\n\n Swift \n\n var nativeScale: CGFloat { get set }\n\n Objective-C \n\n @property (nonatomic) CGFloat nativeScale;\n\n- `\n ``\n ``\n `\n\n ### [scale](#/c:objc(pl)GMSNavigationScreenMetrics(py)scale)\n\n `\n ` \n The natural scale factor associated with the screen. \n\n #### Declaration\n\n Swift \n\n var scale: CGFloat { get set }\n\n Objective-C \n\n @property (nonatomic) CGFloat scale;"]]