detecting if iPhone is in a dark room

后端 未结 6 1574
独厮守ぢ
独厮守ぢ 2020-11-30 03:40

Is there a way to use the iPhone proximity sensor to detect whether the phone is in a room with no light?

This question seems to imply that this is not possible...Do

6条回答
  •  -上瘾入骨i
    2020-11-30 04:16

    If you're doing some Augmented Reality stuff using ARKit you can get the lightEstimate value on each frame of the video feed from the ARSession.

    See documentation on this.

提交回复
热议问题