iOS: Black out screen when putting phone against ear

484 views Asked by At

Is it possible to programmatically replicate the iPhone feature where the screen dims and the touch functionalities are shut off when the phone is against your ear?

1

There are 1 answers

0
XPLOT1ON On
UIDevice.current.isProximityMonitoringEnabled = true

This should enable to proximity sensor and automatically turn screen off when holding against ear