我在 UIPopoverController 中有一个 View Controller 。我想根据是否纵向调整ui。
无论我的 iPad 处于什么方向(物理设备),self.interfaceOrientation 总是报告纵向。我将它记录在 -viewWillAppear: 中,它总是纵向的。
为什么?
最佳答案
使用:
UIInterfaceOrientation deviceOrientation = [UIApplication sharedApplication].statusBarOrientation;
识别状态栏方向。
关于ios - UIPopoverController 中的 UIViewController 始终报告为处于纵向模式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13204001/