Instance Property

isProximityMonitoringEnabled

A Boolean value indicating whether proximity monitoring is enabled (true) or not (false).

Declaration

var isProximityMonitoringEnabled: Bool { get set }

Discussion

Enable proximity monitoring only when your application needs to be notified of changes to the proximity state. Otherwise, disable proximity monitoring. The default value is false.

Not all iOS devices have proximity sensors. To determine if proximity monitoring is available, attempt to enable it. If the value of the isProximityMonitoringEnabled property remains false, proximity monitoring is not available.

See Also

Using the Proximity Sensor

var proximityState: Bool

A Boolean value indicating whether the proximity sensor is close to the user (true) or not (false).