2011-12-15 32 views
0

不工作我做的,我想支持方向的iPad應用,所以我寫了這個代碼:取向的iPad

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation 
{ 
     //return YES; 
    return (interfaceOrientation==UIInterfaceOrientationPortrait||interfaceOrientation==UIInterfaceOrientationLandscapeLeft||interfaceOrientation==UIInterfaceOrientationLandscapeRight); 
} 

我創建在縱向模式下幾桌,所以當我旋轉我的應用程序,表仍然只根據肖像模式,但我的視圖內的表不會自動調整大小。

+0

你需要記錄多一點你的問題。就像你在UIViewController裏面使用UIViewController一樣?這可能會導致方向問題。 – 2011-12-15 05:00:18

+0

我使用的只有導航控制器和只有一個視圖控制器 – AndroidAddiction 2011-12-15 05:02:53

回答

0

您需要確保表格視圖本身設置爲在自動調整大小時在兩個方向上展開和收縮 - 這是通過單擊表格視圖然後單擊標尺側邊欄標題選項卡在IB中設置的最簡單方法,然後確保所有的自動調整選項都打開 - 調整兩個方向的大小,堅持所有的角落。