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
19
votes
6 answers

How to set UITabBarItem's unselected tint, ***including system items*** (iOS7)

(NOTE: I see there are several similar questions on SO, but none of them seem to get at my specific issue of wanting to change the unselected appearance of both custom and system UITabBarItems.) I'm working in iOS7. I have a UITabBar with some…
Olie
  • 24,597
  • 18
  • 99
  • 131
19
votes
2 answers

Prevent tabbar from changing tab at specific index - IOS

Thanks for reading my question. I'm trying to implement a popup menu when a user clicks the tab with the index of 4. So I'm trying to prevent the tabbar from switching viewcontroller when index 4 is pressed. Here is my code: - (BOOL)…
PaperThick
  • 2,749
  • 4
  • 24
  • 42
18
votes
7 answers

iphone app - detect which tab bar item was pressed

i have a tab bar based application, with more than 5 tab bar items - so i get 4 of them directly showing in the view and the rest available by selecting the "More" tab. When a tab bar item is pressed, i want to detect which one was it. So, in the -…
CdB
  • 4,738
  • 7
  • 46
  • 69
18
votes
6 answers

How to change color for tab bar non selected icon in swift?

How to change color for tab bar non selected icon and text? I found this answer (How to change inactive icon/text color on tab bar?), but can't implement it for swift.
Walter West
  • 829
  • 3
  • 12
  • 31
18
votes
4 answers

To change the color of unselected UITabBar icon in iOS 7?

I know this question has been asked earlier as well, but still i didn't get any solution searching the solution on internet. I referred the following posts: How can I change the text and icon colors for tabBarItems in iOS 7? Only able to change the…
Vinay Jain
  • 2,644
  • 3
  • 26
  • 44
18
votes
2 answers

UITabBarItem Image Size

I am making images for my UITabBar. I am making them of size 60x60, because that's what retina screens use. However, when I use that size, it shows up too big in the bar, so you can only see part of the image. When I reduce it down to 30x30, it…
user2397282
  • 3,798
  • 15
  • 48
  • 94
17
votes
4 answers

How to remove programmatically a tab bar item created in parent class NIB file?

Within my iPhone application I have a common tab bar with three tabs that is presented from several views after pressing a button. The approach I followed was the workflow of Tweetie application, described in Robert Conn post. Note that the main…
elitalon
  • 9,191
  • 10
  • 50
  • 86
17
votes
7 answers

UITabBarItem icon not colored correctly for iOS 13 when a bar tint color is specified in Interface Builder in Xcode 11, beta 2

I have a problem with the color of my UITabBarItems when I run on iOS 13 simulators, using Xcode 11, beta 2. I have made a sample project from scratch, and everything works correctly when I do not specify a bar tint color. However, when I do…
Jordan Wood
  • 2,727
  • 3
  • 12
  • 17
17
votes
7 answers

How do I get the width of a UITabBarItem?

The width of a UITabBarItem varies, depending on how many there are. How do I determine how wide my tab bar items are? I'm looking for a property if possible, as opposed to a mathematical formula, since on the iPad, there is also an issue of…
Moshe
  • 57,511
  • 78
  • 272
  • 425
17
votes
3 answers

Tab Bar Icon Size

Apple says: Depending on the device and orientation, the system displays either a regular or compact tab bar. Your app should include custom tab bar icons for both sizes. Unfortunately, they fail to specify when you get which. Also I might include…
Alper
  • 3,424
  • 4
  • 39
  • 45
16
votes
3 answers

How can I find the UIView for a specific UITabBarItem?

I am using an external library called SwiftyWalkthrough, which allows me to expose only certain views on the screen to guide a new user through my app's UI. The first item I want exposed to the user is a UITabBarItem. I need to find the UIView…
Carl Smith
  • 1,236
  • 15
  • 18
16
votes
5 answers

How to move title of UITabBarItem?

Can somebody tell me please how can I move title of UITabBarItem for example 2px to top?
iWizard
  • 6,816
  • 19
  • 67
  • 103
15
votes
2 answers

How to properly customize UITabBar and UITabBarItem on iOS 7 and iOS 8?

I am googling around so much, but nowhere I find a straight and consolidated answer. I want to customize myUITabBarController such that: the UITabBar itself is completely black the text color of the item titles is white in non-highlighted state the…
nburk
  • 22,409
  • 18
  • 87
  • 132
14
votes
2 answers

Setting badge value in UITabBarItem in UIViewController

I am adding UITabBarController to the window, and setting the viewControllers property of the UITabBarController to the array of ViewControllers. If i am setting the badge value inside the viewController then its working fine. …
Biranchi
  • 16,120
  • 23
  • 124
  • 161
14
votes
3 answers

ios tabbar put text in the middle when no image

My tabbar consists only of text, no images. The problem is that the text always show on the bottom of the tab, is there a way to position the text in the middle ? Thank you
Dany Y
  • 6,833
  • 6
  • 46
  • 83
1 2
3
66 67