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 475 times
0
-
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
3
UIDevice.current.isProximityMonitoringEnabled = true
This should enable to proximity sensor and automatically turn screen off when holding against ear

XPLOT1ON
- 2,994
- 2
- 20
- 36