2
當我將模擬器從縱向旋轉到橫向時,標題不旋轉。我想使用UIInterfaceOrientation旋轉標題和視圖旋轉。 UIInterfaceOrientation隨聽者一起旋轉
當我將模擬器從縱向旋轉到橫向時,標題不旋轉。我想使用UIInterfaceOrientation旋轉標題和視圖旋轉。 UIInterfaceOrientation隨聽者一起旋轉
@renuga我認爲你需要在你的視圖控制器中實現這個方法。
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
{
if(toInterfaceOrientation == UIInterfaceOrientationLandscapeRight)
return YES;
if(toInterfaceOrientation == UIInterfaceOrientationPortrait)
return YES;
return NO;
}
去IB,然後點擊下面的箭頭。
,有您需要調整您的標籤欄的位置
@robin:非常感謝您的快速響應。上面的代碼根據方向旋轉狀態欄(僅)。它不是旋轉我的意思(它可能是導航欄或工具欄)的標題。 – kanmani 2011-02-15 08:05:48
請人給我指導,做到這一點。 – kanmani 2011-02-15 08:49:08