views:

27

answers:

1

Is the proximity sensor available in landscape mode?

It only seems to work for me when I'm in portrait...

A: 

I don't know if this is deliberate or a bug but apparently proximity sensor only works when the statusBar is in portraitOrientation so:

[[UIApplication sharedApplication] setStatusBarOrientation:UIInterfaceOrientationPortrait animated:NO];

...does the trick.

sebrock