【发布时间】:2010-07-04 19:08:32
【问题描述】:
您好,当我的应用处于横向时添加子视图时遇到问题。加载视图时,它处于纵向模式,因此部分视图丢失,我可以在右侧看到主视图。如果我以纵向模式加载子视图,然后旋转 iPhone,它旋转到横向没有问题。我用谷歌搜索了很多,这似乎是一个常见问题,但我无法找到解决方案。请问有人可以帮忙吗?
这是我添加视图的代码...
PreferencesViewController *screen = [[PreferencesViewController alloc]initWithNibName:nil bundle:nil];
[self.view addSubview:screen.view];
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:0.5];
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView:self.view cache:YES];
[UIView commitAnimations];
谢谢:-)
【问题讨论】: