Syed e Hussaini Syed e Hussaini - 3 months ago 36
Objective-C Question

Tabbar Background image is not perfectly placing

I have a

i want to change its background image when i change the background image to using this code

self.tabBar setBackgroundImage:[UIImage imagenamed:@"texture.jpg"]];

Instead of changing the
background image it changes the whole screens background image.

Change Image of Red Rectangular Box Below
Image2 Screenshot


Use this code in your AppDelegate after setting tabBarController as rootViewController

UITabBarItem *item = [self.tabBarController.tabBar.items objectAtIndex:0];
item.image = [UIImage imageNamed:@"YourDeselectImage.png"];
item.selectedImage = [UIImage imageNamed:@"YourSelectImage.png"];