2011-12-22 4 views
0

私のUITabBarItemsがUITabBarの中央に垂直に表示されません。私は私のUITabBarのカスタムサイズの背景画像を使用しています。UITabBarItemsがカスタムサイズのUITabBarにセンタリングしていません

UITabBarController *tabController = [[UITabBarController alloc] init]; 

UITabBar *tabBar = [controller tabBar]; 
UIImage *backgroundImage = [UIImage imageNamed:@"Images/bottomBar.png"]; 
[tabBar setBackgroundImage:backgroundImage]; 

SplashScreenController *introController = [[SplashScreenController alloc] init]; 
UIImage *introImage = [UIImage imageNamed:@"Images/navIntro.png"]; 
UITabBarItem *introItem = [[UITabBarItem alloc] initWithTitle:@"Intro" image:introImage tag:0]; 
[introController setTabBarItem:introItem]; 

NSMutableArray *controllers = [[NSMutableArray alloc] init]; 
[controllers addObject:introController]; 

NSArray *controllers = [self createControllers]; 
[tabController setViewControllers:controllers]; 

nav bar

答えて

1

あなたがそのような60x60 [email protected]として、あなたのファイルの網膜のバージョンが欠落しているように見えます。 [email protected]ファイルがプロジェクトに存在する必要がありますが、コードではまだファイルをnavIntro.pngと参照しています。

関連する問題