【发布时间】:2011-02-15 06:58:58
【问题描述】:
当我将模拟器从纵向旋转到横向时,标题没有旋转。我想使用 UIInterfaceOrientation 旋转标题和视图旋转。
【问题讨论】:
-
请任何人指导我这样做。
标签: iphone cocoa-touch uiinterfaceorientation
当我将模拟器从纵向旋转到横向时,标题没有旋转。我想使用 UIInterfaceOrientation 旋转标题和视图旋转。
【问题讨论】:
标签: iphone cocoa-touch uiinterfaceorientation
@renuga 我认为您需要在视图控制器中实现此方法。
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
{
if(toInterfaceOrientation == UIInterfaceOrientationLandscapeRight)
return YES;
if(toInterfaceOrientation == UIInterfaceOrientationPortrait)
return YES;
return NO;
}
前往 IB 并点击如下所示的箭头。
你需要调整标签栏的位置
【讨论】: