Questions tagged [uitabbaritem]

The UITabBarItem class implements an item on a tab bar, instances of the UITabBar class. Tab bar items are used to configure the tab bar.

Tab bar items gives the ability to switch between different subtasks, views, or modes. A tab bar operates strictly in radio mode, where one item is selected at a time—tapping a tab bar item toggles the view above the tab bar. There is a way to specify a badge value on the tab bar item for adding additional visual information—for example, the Phone application uses a badge on the item to show the number of new messages. This class also provides a number of system defaults for creating items.

991 questions
200
votes
15 answers

Change tab bar item selected color in a storyboard

I want to change my tab bar items to be pink when selected instead of the default blue. How can i accomplish this using the storyboard editor in Xcode 6? Here are my current setting which are not working, the blue background works but the pink…
Deekor
  • 9,144
  • 16
  • 69
  • 121
111
votes
11 answers

Moving UITabBarItem Image down?

Normally on each tab of a UITabBar you have a small image and a title naming the tab. The image is positioned/centred towards the top of the tab to accommodate the title underneath. My question is: if you want to have a tabBar with just an image and…
fuzzygoat
  • 26,573
  • 48
  • 165
  • 294
101
votes
6 answers

What size should TabBar images be?

I have icons for a tabBar of size 100. I checked at Apple's Human Interface Guidelines of 2013 and it says the image size should be 30x30 / 60x60. But as the height of tab bar controller is 50, I kept the size of the image at 50x50. Now, when I run…
Fahim Parkar
  • 30,974
  • 45
  • 160
  • 276
92
votes
19 answers

Remove tab bar item text, show only image

Simple question, how can I remove the tab bar item text and show only the image? I want the bar items to like in the instagram app: In the inspector in xcode 6 I remove the title and choose a @2x (50px) and a @3x (75px) image. However the image…
DarkLeafyGreen
  • 69,338
  • 131
  • 383
  • 601
84
votes
25 answers

Changing tab bar item image and text color iOS

Here is my tab bar: The following image shows the program being run and the "NEWS" item selected: It is clear the bar tint color is working fine as I want ! But the tintColor only affects the image and not the text. Also, when the an item is…
Greg Peckory
  • 7,700
  • 21
  • 67
  • 114
69
votes
14 answers

Unselected UITabBar color?

I have an UITabBar with 5 items. I want to change the unselected color of all items. The items aren't declared in the UIViewController classes (i built them and linked the views in the Storyboard). Is there an code like this : [[UITabBar appearance]…
user1530090
  • 705
  • 1
  • 5
  • 6
61
votes
20 answers

How to change inactive icon/text color on tab bar?

How can I change inactive icon/text color on iOS 7 tab bar? The one in gray color.
Pablo
  • 28,133
  • 34
  • 125
  • 215
54
votes
8 answers

ios 11 UITabBar UITabBarItem positioning issue

I have built my app using new Xcode 9 beta for ios 11. I have found an issue with UITabBar where items are spread through the UITabBar and title is right aligned to the image. I have tried changing the code to get it to work but still not…
Gihan
  • 2,476
  • 2
  • 27
  • 33
43
votes
12 answers

iOS 7 tabBar-line, how to remove it?

Apple has added a tiny line over the tabBar in iOS 7 which is supposed to work as a shadow or fade between the tabBar and the UI Since I am using a custom-made tabBar the line is quite irritating. How do you remove it? Please tell me it is…
40
votes
11 answers

Getting the frame of a particular tab bar item

Is there a way to find the frame of a particular UITabBarItem in a UITabBar? Specifically, I want to create an animation of an image "falling" into one of the tabs, similar to e.g. deleting an email in the Mail, or buying a track in the iTunes app. …
Daniel Dickison
  • 21,832
  • 13
  • 69
  • 89
37
votes
10 answers

How to set tab bar item title programmatically in objective c?

I want to set title to tab item programatically, but it not works. My code is below: - (IBAction)tab1Click:(id)sender { myTabBarController = [[UITabBarController alloc] init]; view2Controller = [[View2Controller alloc] init]; …
Hacer sengul Akac
  • 683
  • 3
  • 17
  • 25
37
votes
12 answers

Changing font size of tabbaritem

Is it possible to change the font size of tabs?
4thSpace
  • 43,672
  • 97
  • 296
  • 475
34
votes
7 answers

Image is not showing up for tab bar item

I uploaded an image to assets folder and assigned the image to 1x, 2x and 3x. selected the table view controller of the respective tab bar item -> selected the Attributes -> assigned the image to the image field in the Bar Items section. After…
TeKnofUNk
  • 531
  • 1
  • 7
  • 9
32
votes
17 answers

Is it possible to change UITabBarItem badge color

I want to change background color of UITabBarItem badge but can't find any resource on how to make it.
1110
  • 7,829
  • 55
  • 176
  • 334
31
votes
3 answers

iOS Tab Bar icons keep getting larger

I am having a problem with my icons in my tabBar. Tapping the same tab bar button repeatedly will keep increasing the tab bar icon's size. If I push a different one, it goes back to its original size. Any ideas what I should fix?
1
2 3
66 67