开发者

Is it possible NOT to turn off display when monitoring proximity?

开发者 https://www.devze.com 2023-02-17 17:04 出处:网络
In loadView I\'m adding myself as observer for [nc addObserver:self selector:@selector(proximityAlert:)

In loadView I'm adding myself as observer for

[nc addObserver:self 
       selector:@selector(proximityAlert:)
           name:UIDeviceProximityStateDidChangeNotification
         object:device];

then I tell device to start generating those alerts

[device setProximityMonitoringEn开发者_运维知识库abled:YES];

and I handle them in

-(void)proximityAlert:(NSNotification *)note

The problem is that when I cover the sensor for too long, the screen turns off, which in my app's case is not convenient.

Thanks in advance for all answers.


idleTimerDisabled is not a valid solution to this question. (Not deleting as comments below will go lost if I do.)

0

精彩评论

暂无评论...
验证码 换一张
取 消