我创建了一个uisplitview,在SplitView是景观模式下的加载之后,我使用PresentModalView显示了模量,我的问题是ModalView始终处于肖像模式,无法找到解决方案。

UIDeviceOrientation orientation = [[UIDevice currentDevice] orientation];

它给了我景观取向,但使用

UIDeviceOrientation orientation = [[UIApplication sharedApplication] statusBarOrientation]

给我肖像。 (不在4.2下工作)

谢谢,

有帮助吗?

解决方案

我使用nstimer并使用它的功能及其工作,这有点棘手,但这是我现在发现的唯一解决方案。

[NSTimer scheduledTimerWithTimeInterval:0.1 target:self selector:@selector(loadingModal:) userInfo:nil repeats:NO];
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top