2012-01-16 123 views
0

我使用的Xcode 4.2深化發展的應用旋轉的觀點,我是用故事板無法使用故事板

我試圖使應用程序可旋轉的,但它不牛逼旋轉,這裏是我使用的代碼:

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation 
{ 
    // Return YES for supported orientations 
    return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown || interfaceOrientation != UIInterfaceOrientationLandscapeRight || interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown|| interfaceOrientation !=UIInterfaceOrientationPortrait); 

} 

,並在項目信息,我支持所有的方向....

我這麼想嗎?

感謝

+0

你提到你有所有的方向支持。但是,在項目信息頁面中,您可以檢查屬性「支持的接口方向」屬性,並檢查所有方向是否存在 – jajo87 2012-01-16 19:35:09

+0

「支持的接口方向」,類型:數組,值:4項(以及他們在那裏) – user1051935 2012-01-16 19:48:32

回答

0

如果你想支持所有的方向,你應該只返回是的,有什麼,而不是你的,它每次會是反正。這是您的頂級視圖控制器嗎?如果你已經將視圖控制器嵌入到另一個視圖控制器中(通常你不應該這樣做),但要確保最頂層的視圖控制器具有此方法,並返回yes。

+0

我試圖返回YES,但仍然沒有工作......我已經在所有的意見,並沒有任何意見 – user1051935 2012-01-16 19:21:34