Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我能够在 iPhone SDK 上检测到接近度,但只要触发接近度状态,屏幕就会黑屏。
有没有办法可以防止接近传感器使屏幕变黑,但仍然监视接近传感器的状态?
谢谢!
您通常可以覆盖-(void)proximityStateChanged:(BOOL)更改的方法并在那里做您的事情,仍然获得更改的 BOOL 状态。
-(void)proximityStateChanged:(BOOL)