iPhone proximity sensor in landscape not available?
Is the proximity sensor available in landscape mode?
It only seems to work 开发者_JS百科for me when I'm in portrait...
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.
精彩评论