GoogleNavigation Framework Reference
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 2024-11-15 UTC.
[null,null,["Last updated 2024-11-15 UTC."],[[["The `GMSNavigationScreenMetrics` protocol provides information about screen metrics, similar to some properties of `UIScreen`."],["It includes properties for the screen's bounding rectangle in points (`bounds`) and pixels (`nativeBounds`)."],["It also provides the screen's native scale factor (`nativeScale`) and natural scale factor (`scale`)."]]],["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"]]