iPhone Proximity Sensor

后端 未结 13 1901
感动是毒
感动是毒 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:33

    Evidently the proximity sensor will never turn on if the status bar is in landscape orientation. i.e. if you call: [UIApplication sharedApplication].statusBarOrientation = UIInterfaceOrientationLandscapeLeft; You will no longer get proximity:ON notifications. This definitely happens on OS 3.0, I can't test it on a 2.X device since I don't have one with a proximity sensor. This seems like a bug. answered Jul 22 '09 at 5:49 Kevin Lambert


    I've encoutered this problem too. It took me a long time to figure out the real reason of why the proximity sensor is not working. When orientation is UIInterfaceOrientationLandscapeLeft or UIInterfaceOrientationLandscapeRight, proximity sensor does not work; while in portrait mode it works well. My iPhone is iPhone 4S (iOS SDK 5.0).

提交回复
热议问题