为什么我的UITableView不旋转? [英] Why won't my UITableView rotate?
问题描述
在Interface Builder中,我有以下
Within Interface Builder, I have the following
UIViewController
-- View
---- TableView
在我的UIViewController中,我已设置
In my UIViewController I have set
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return YES;
}
我还有IB中的其他视图控制器。我在这里想念什么?使它旋转的唯一方法是使用transform方法。
I also have other view controllers that are in IB. What am I missing here? The only way I can get it to rotate is if I use the transform method.
推荐答案
您是否在选项卡中使用tableview基于应用程序的机会?如果您愿意的话,只有标签栏控制器的所有视图控制器都支持横向模式时,您才能获得支持横向模式的视图。
Are you using the tableview in a tab-based app by any chance? In case you are, you can only get a view to support landscape mode if all the viewcontrollers of the tabbar controller support landscape mode.
除此之外,我不查看您的视图不支持横向模式的任何原因。
Other than that, I don't see any reason why your view should not support landscape mode.
这篇关于为什么我的UITableView不旋转?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!