iPhone proximity sensor in landscape not available?
سؤال
Is the proximity sensor available in landscape mode?
It only seems to work 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.
لا تنتمي إلى StackOverflow