2012-03-13 72 views
0

我有一個支持兩種方向的iPad應用程序我在Info.plist上支持的界面方向爲橫向(右主頁按鈕)和橫向(離開主頁按鈕)。我還將初始界面方向設置爲橫向(右側主頁按鈕)。ipad上的通知橫幅在應用程序啓動時顛倒顯示橫向(左主頁按鈕)

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {  

    [[UIApplication sharedApplication] setStatusBarOrientation:UIInterfaceOrientationLandscapeRight]; 
} 

當我收到推送通知和我的應用程序關閉。而且我不是從通知開始的應用程序。通知橫幅出現在底部。只有當我在風景上持有ipad時(左主頁按鈕),纔會發生這種情況。有什麼我失蹤?任何幫助,將不勝感激。在此先感謝,

回答

4

我也面臨同樣的問題,並嘗試了很多方法; 在我的應用我只需要橫向,所以我設置

return UIInterfaceOrientationIsLandscape(interfaceOrientation);

中的每一個ViewController

shouldAutorotateToInterfaceOrientationinfo.plist支持的接口方向我設置

<array> 
    <string>UIInterfaceOrientationLandscapeLeft</string> 
    <string>UIInterfaceOrientationLandscapeRight</string> 
    <string>UIInterfaceOrientationLandscapeLeft</string> 
    <string>UIInterfaceOrientationLandscapeRight</string> 
</array> 

這解決了我問題。

+0

真棒:)似乎它會工作 – akshay1188 2012-06-25 12:10:41

相關問題