3

I want to change the background of tab bar item with some image . Can anyone help me out in this regard?

Here is what i wanted :

enter image description here

Also i need to know what should be the size of background image . My images are getting out of bound

enter image description here

Nimit Parekh
  • 16,776
  • 8
  • 50
  • 72
warzone_fz
  • 472
  • 1
  • 9
  • 24

2 Answers2

2

To change background colour of UITabBar

TabBarController* Tcontroller =(TabBarController*)self.window.rootViewController;
Tcontroller.tabBar.barTintColor=[UIColor greenColor];
Abhinandan Pratap
  • 2,142
  • 1
  • 18
  • 39
1

you should calculate your image size for your tabbaritem by yourself, based on its quantity, for example if you have 4 tab items: the width of every item will be 1/4 of screen width and the height is a tablet height.

Alex Kosyakov
  • 2,095
  • 1
  • 17
  • 25