Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I monitor the iPhone proximity sensor without turning off screen? Also, landscape

I've got the proximity sensor working so that I can trigger events when in proximity, but I'm trying to use it as a sort of dead man switch. The problem is that whenever in proximity, the screen turns off, which drastically reduces the usability of the app :P Also, the proximity sensor doesn't seem to activate when in landscape mode (I can't see the flashing light in my camera). Is there any way to get around these standard events and methods?

like image 856
SeniorShizzle Avatar asked Nov 14 '22 09:11

SeniorShizzle


1 Answers

Your current UIDevice has a proximityState property on it. May be useful.

like image 117
zelk Avatar answered Dec 11 '22 09:12

zelk