【发布时间】:2009-10-17 06:19:21
【问题描述】:
我有 2 个 GUI 和 2 个控制器 1个叫landscapeguicontroller,2个叫highguicontroller。
现在我通常调用 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);
}
当我想回到我调用的 highguicontroller 时:
[self dismissModalViewControllerAnimated:YES];
一切正常,但就在第二个动画中,我看到了正确的“旋转动画”。 你有什么建议吗?
所以一个简短的问题描述: 1.动画中从高处到风景,风景被推入窗口 但是在2.从横向到高处的动画中,旋转看起来像真正的旋转......
我希望 1.animation 看起来像 2.animation
最好的问候 Ploetzeneder
【问题讨论】:
标签: objective-c uiview landscape portrait