【发布时间】:2011-01-11 13:30:32
【问题描述】:
我正在制作一个仅限横向的应用程序。因此,我的根 UIViewController 设置为横向(我拥有的所有 xib 文件都是横向的)。
// Override to allow orientations other than the default portrait orientation.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
// Return YES for supported orientations
return (interfaceOrientation == UIInterfaceOrientationLandscapeRight);
}
当我尝试触摸其中一个子视图中的按钮时,它没有收到触摸。如果我删除上面显示的覆盖,按钮会被触摸,但子视图会以纵向显示。
我应该如何解决这个问题?
感谢和最好的问候,
大卫
【问题讨论】:
标签: iphone uiviewcontroller orientation