私のiPadアプリケーションでは、
ios5.0を使用しています。
タブバーの背景画像を設定しました。
私のアプリケーションにはタブ バー コントローラーがあり、menuVC はビュー コントローラーの 1 つです。
私の問題は
アプリを縦向きモードで起動すると、横向きモードの画像が表示されました。
1. Appdelegate で。
if(menuVC.interfaceOrientation==UIInterfaceOrientationPortrait || menuVC.interfaceOrientation==UIInterfaceOrientationPortraitUpsideDown)
{
[tabBarController.tabBar setBackgroundImage:[UIImage imageNamed:@"footerportrait.png"]];
}
else {
[tabBarController.tabBar setBackgroundImage:[UIImage imageNamed:@"footerlandscape.png"]];
}
2. インターフェイスの向きに自動回転する必要があります。
if(UIInterfaceOrientationIsPortrait(interfaeorientation))
{
[self.tabBarController.tabBar setBackgroundImage:[UIImage imageNamed:@"footerportrait.png"]];
}
else
{
[self.tabBarController.tabBar setBackgroundImage:[UIImage imageNamed:@"footerlandscape.png"]];
}
なぜこれが起こっているのかわかりません。
助けてくれてありがとう。
問題は画像ではないと思いますが、ナビゲーション バーの幅が 1024.!