Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
横向模式下是否可以使用接近传感器?
当我在肖像时,它似乎只对我有用......
我不知道这是故意的还是错误的,但显然接近传感器仅在 statusBar 处于 PortraitOrientation 时才有效,因此:
[[UIApplication sharedApplication] setStatusBarOrientation:UIInterfaceOrientationPortrait animated:NO];
......成功了。