我有两个GUI和两个控制器,一个叫做landscapeguicontroller,另一个叫做highguicontroller。
通常情况下,我调用highguicontroller,当我旋转我的iPhone时,它会检测到并显示landscapeguicontroller: 代码:
问题在于动画会将新窗口从iPhone的外侧推入到窗口中。在Landscapeguicontroller中,我已添加以下几行代码:
通常情况下,我调用highguicontroller,当我旋转我的iPhone时,它会检测到并显示landscapeguicontroller: 代码:
landscapeguicontroller *neu =[[landscapeguicontroller alloc] initWithNibName:nil bundle:nil];
[self presentModalViewController:neu animated:YES];
[self dismissModalViewControllerAnimated:YES];
问题在于动画会将新窗口从iPhone的外侧推入到窗口中。在Landscapeguicontroller中,我已添加以下几行代码:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
当我想回到高级UI控制器时,我调用:
[self dismissModalViewControllerAnimated:YES];
所有的都可以工作,但只有在第二个动画中我才能看到正确的“旋转动画”。 你有什么建议吗?
问题简述: 在从高度到横向的第一次动画中,横向被推入窗口, 但是在从横向到高度的第二个动画中,旋转看起来像真正的旋转...
我希望第一个动画看起来像第二个动画。
最好的问候 Ploetzeneder