Question

Is the proximity sensor available in landscape mode?

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

Était-ce utile?

La solution

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.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top