編輯

共用方式為


UIDevice.ProximityState Property

Definition

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.

Applies to