2011-08-28 81 views
0

我上傳到應用商店時遇到了問題。它被拒絕了,因爲它不支持「Home-Button up」和「Home-Button down」方向。剛起來。現在我試着解決這個問題,需要你的幫助。我其實只是有一個webview和兩個按鈕的工具欄。我怎樣才能讓它們旋轉?Xcode iPad旋轉問題

+0

這與Xcode有什麼關係? – 2011-08-28 15:35:46

回答

0

在視圖控制器:

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation 
{ 
    // Return YES for supported orientations 
     return UIInterfaceOrientationIsPortrait(interfaceOrientation); 
} 
+0

我把代碼放到我的AppDelegate.m中,然後用iPhone模擬器運行它,但是當我旋轉模擬器時,沒有任何事情發生,這個應用程序沒有旋轉它,只是錯誤的方向......有什麼不對? – Valle

1

所有方位的支持添加您的視圖控制器內:

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { 
    return YES; 
} 

在iPad上它確實沒有意義地說,應用程序不能與家裏導向按鈕下來,但沒有主頁按鈕。