Proximity sensor turns off my screen

I developed one application that uses a Proximity Sensor . Correctly determine the change in state when moving along the proximity sensor. but display a black screen when the hand stops in front of the proximity sensor. I do not need this black screen.

I tried this line of code.

 UIApplication *thisApp = [UIApplication sharedApplication]; thisApp.idleTimerDisabled = YES; 

but does not work.

Thanks at Advance.

+4
source share
1 answer

Unfortunately, there is no way to prevent the screen from darkening when the proximity sensor approaches. Hopefully Apple will change this in the future.

0
source

Source: https://habr.com/ru/post/956315/


All Articles