UIDevice.ProximityState Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Determines whether the device is close to the user.
public virtual bool ProximityState { [Foundation.Export("proximityState")] get; }
member this.ProximityState : bool
Property Value
true
if the device is close to the user.
- Attributes
Remarks
The proximity sensor is a device that detects when the device is being held close to the head. (It works by detecting infrared light being reflected back into the device.)
This property represents the current state of the proximity sensor, returning true
when the device is close to the user (for instance, when held to the ear during a phone call).
This can be used from a background thread.