I set up the tab bar using methods from Ray Wenderlich and iOS Blog, but since I use light color as the background, the text shortcuts look awful and I want to change them to suit my style. Is it possible and how?
If this is not possible, or if it is too complicated, I would like to ask how to move the icon of the icon down to focus it on the tab bar? That way I could "write" tags in .png files.
I plan to develop this application for iOS5 +, so there is no concern about its compatibility with iOS4 (although if someone finds an easy way to do this, I would really appreciate it).
Here is what I got , and here is what I want .
Code for my tabBarBackground:
UIImage* tabBarBackground = [UIImage imageNamed:@"tabbar.png"]; [[UITabBar appearance] setBackgroundImage:tabBarBackground]; [[UITabBar appearance] setSelectionIndicatorImage:[UIImage imageNamed:@"selection-tab.png"]];
And for the icons:
//Custom TabBar Items UIImage *selectedImage = [UIImage imageNamed:@"home-icon-selected.png"]; UIImage *unselectedImage = [UIImage imageNamed:@"home-icon.png"]; UITabBar *tabBar = rootTabBarController.tabBar; //Icons for the 1st Tab UITabBarItem *item1 = [tabBar.items objectAtIndex:0]; [item1 setFinishedSelectedImage:selectedImage withFinishedUnselectedImage:unselectedImage];
source share