当我将模拟器从纵向旋转为横向时,标题不旋转。我想使用 UIInterfaceOrientation 随 View 旋转一起旋转标题。
最佳答案
@renuga 我认为你需要在 View Controller 中实现这个方法。
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
{
if(toInterfaceOrientation == UIInterfaceOrientationLandscapeRight)
return YES;
if(toInterfaceOrientation == UIInterfaceOrientationPortrait)
return YES;
return NO;
}
转到 IB 并点击下面所示的箭头。
您需要调整标签栏的位置
关于iphone - UIInterfaceOrientation 随 Header 一起旋转,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5000718/