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?
Asked
Active
Viewed 434 times
-1
-
I have certainly seen VOIP app on iOS did it but never tried to implement it myself – XPLOT1ON Aug 16 '17 at 19:37
-
see this answer https://stackoverflow.com/a/168561/1040347 – Aleksey Potapov Aug 16 '17 at 19:40
1 Answers
2
UIDevice.current.isProximityMonitoringEnabled = true
This should enable to proximity sensor and automatically turn screen off when holding against ear
XPLOT1ON
- 2,454
- 2
- 19
- 34