Ich habe eine tabBar
erstellt und Bild in es gesetzt, aber es lässt zu viel Platz unter der tabBarItem
. Wie kann ich das entfernen?Wie entferne ich Platz unter dem UITabBarItem?
Das ist mein tabBar
als jetzt
Anzeigen Und ich möchte, um es anzuzeigen ähnliche
Tabbar anzuzeigen
firstVC = [[FirstViewController alloc] initWithNibName:@"FirstViewController" bundle:nil];
secondVC = [[SecondViewController alloc] initWithNibName:@"SecondViewController" bundle:nil];
thirdVC = [[ThirdViewController alloc] initWithNibName:@"ThirdViewController" bundle:nil];
forthVC = [[ForthViewController alloc] initWithNibName:@"ForthViewController" bundle:nil];
[[UITabBar appearance] setTintColor:[UIColor whiteColor]];
NSArray *viewControllersArray = [[NSArray alloc] initWithObjects:firstVC,secondVC,thirdVC,forthVC, nil];
self.tabController = [[UITabBarController alloc] init];
[self.tabController setViewControllers:viewControllersArray animated:NO];
[self.window addSubview:self.tabController.view];
//self.tabController.selectedIndex = 1;
self.tabController.delegate = self;
self.window.rootViewController = self.tabController;
[self.window makeKeyAndVisible];
Für tabBar Hintergrundbild i diesen Code verwendet haben
UIImage* tabBarBackground = [UIImage imageNamed:@"tabbarimg1.png"];
[[UITabBar appearance] setBackgroundImage:tabBarBackground];
Und für die imge auf Artikel eingestellt habe ich diesen Code verwendet
//used to set the tabBarItem images
[self.tabBarItem setFinishedSelectedImage:[UIImage imageNamed:@"home_tab"] withFinishedUnselectedImage:[UIImage imageNamed:@"home_tab"]];
//Set the badge on tabBarItem
[self.tabBarItem setBadgeValue:@"15"];
Wo ist Ihre Tabbar? wie Sie geschrieben haben "Dies ist meine Tabbar als gerade jetzt anzeigen" –
Gibt es ein Problem, wie ich mein Bild in Frage es ein anderes Bild wie GTA Vice City Bild anzeigen .... Seltsam .... –
Hey @Kane Don 't zeigen Sie Ihre Tabbar ...... –