【发布时间】:2012-06-14 16:52:46
【问题描述】:
我想强制我的视图去横向,就在我调用一个方法时。
当我的方法运行时,我调用:
[self shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)UIInterfaceOrientationLandscapeRight];
自动旋转的方法
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
{
return UIInterfaceOrientationIsLandscape(toInterfaceOrientation);
}
问题是视图不会强制旋转。可以在模拟器上测试,还是只在真机上运行?
【问题讨论】:
标签: ios uiview autorotate