iPhone Proximity Sensor

后端 未结 13 1945
感动是毒
感动是毒 2020-12-01 00:47

Can the iPhone SDK take advantage of the iPhone\'s proximity sensors? If so, why hasn\'t anyone taken advantage of them? I could picture a few decent uses.

For examp

13条回答
  •  栀梦
    栀梦 (楼主)
    2020-12-01 01:42

    There is a public API for this. -[UIApplication setProximitySensingEnabled:(BOOL)] will turn the feature on. BTW, it doesn't seem to be using the light sensor, because proximity sensing would tweak out in a dark room.

    However, the API call basically blanks the screen when you hold the phone up to your face. Not useful for interaction, sadly.

提交回复
热议问题