我搜索了每一個地方,但沒有找到解決方案這是我在iPhone新。在每一個我得到的設置導航的高度或我的看法是不旋轉的方向像issue.my視圖是旋轉,但我的導航欄是在相同的位置,請有人幫助我,如果你有解決方案。感謝我顯示了一些代碼在我用於Orientation.When我點擊我的標籤欄我的模擬器是自動旋轉,我希望製表符酒吧也旋轉,但使用此代碼只模擬器旋轉不是標籤欄和導航欄,並抱歉我的英語不好。導航欄問題的方向
CGAffineTransform transform = CGAffineTransformIdentity;
switch ([[UIApplication sharedApplication] statusBarOrientation])
{
case UIInterfaceOrientationPortrait:
transform = CGAffineTransformMakeRotation(M_PI_2);
break;
default:
break;
}
[[UIApplication sharedApplication]setStatusBarOrientation:UIInterfaceOrientationPortrait];
[UIView animateWithDuration:0.2f animations:^ {
[self.navigationController.view setTransform:transform];
}];
[self.view setFrame:CGRectMake(0, 0, 320, 480)];
[self.view setNeedsLayout];
導航欄自動旋轉。當方向改變時。並提交你的這行// [[UIApplication sharedApplication] setStatusBarOrientation:UIInterfaceOrientationPortrait]; ...嘗試它 – Ayaz 2012-04-17 13:28:36
@Ayaz謝謝但這種解決方案是不工作在我的代碼它停止我的自動模擬器orientation.I只是想旋轉導航欄旋轉我的看法已經旋轉,如果你有解決方案幫助我哥們非常感謝你 – vishiphone 2012-04-18 03:52:04