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
13
votes
1 answer

UITabBar / UITabBarItem and iOS 13's Dark Mode

In our app, we use custom UITabBarItem dynamically (see below) programmatically. We use ImageAssets to get the dark/light right images. But it doesn't work at 100% : if we restart the app, it's fine. If iOS switch to dark mode and the app is…
Didier
  • 141
  • 2
  • 6
12
votes
2 answers

UITabBarItems in UITabBar show after I click the item not when application launches

This application I'm writing has a problem. I'm setting up the UITabBar in my application window and set the icons in the view files. But when i run the app, the first icons show up (because the view is loaded I guess) and the other icons do not…
Olsi
  • 929
  • 2
  • 12
  • 26
12
votes
4 answers

Add a line as a selection indicator to a UITabbarItem in Swift

I wanna use a thick line at the bottom of a UITabbarItems as a selection indicator. Due to the fact that the App must work on different phone sizes, I cannot use a image as selection indicator. That's why I think I have to use Swift to do this. (The…
Tobonaut
  • 2,245
  • 2
  • 26
  • 39
11
votes
2 answers

ios13 - UITabBar tintColor for unSelectedItem not working

In Xcode 10 unselectedItemTintColor property working properly but after Xcode 11 with ios 13 UITabbar unselectedItemTintColor property not working. override func viewDidLoad() { super.viewDidLoad() myTabbar.unselectedItemTintColor =…
11
votes
7 answers

How to hide the title on the tab bar item with navigation controller

I have a tab bar item on navigation controller connected with tab bar controller and i want to delete the title in swift Tab Bar Controller > Navigation Controller > View Controller Tab Bar Item Flow of the program The application start with the…
11
votes
8 answers

UITabBarItem Image disappearing when selected Xcode 6 Beta

Fairly new to development however the Xcode Betas are giving me a bit of a headache (Xcode 6 beta 5 / iOS 8). Have found some answers but mostly relating to Xcode 5 and under. Everything runs fine, however the selected icon/view controller…
deltajuliet
  • 113
  • 1
  • 4
11
votes
6 answers

How to disable/enable a particular UITabBar Item,

I have 3 tabs in my UITabbarController, that I created in my Appdelegate. When I open the app, I have made the selected tabbarItem the third tabbarItem. The user can only select the UITabBarItem at Index 0, when he is logged in. I tried every thing…
Jasmeet
  • 1,522
  • 2
  • 22
  • 41
11
votes
5 answers

Is it possible to customize UITabBarItem Badge?

The question below is similar as mine. How to use a custom UIImage as an UITabBarItem Badge? Is it possible to use a background image instead of drawing it myself? I think it's fine since my app will only use a 1-digit badgeValue. If it is not…
Michelle Ybanez
  • 111
  • 1
  • 1
  • 4
10
votes
5 answers

How to change the width of UITabBarItem?

How to change the width of UITabBarItem? I have an item with the title, that is wider than default item width. How can I fix it?
demon9733
  • 1,054
  • 3
  • 13
  • 35
10
votes
3 answers

Problem adding tab bar items to UITabBar

I have a tab bar based application in which I am trying to add tab bar items to the tab bar dynamically using setItems method of the UITabBar. Here is the code: [self.tabBarController.tabBar setItems:self.level1TabBarItems animated:YES]; Where…
Aqueel
  • 1,246
  • 3
  • 23
  • 46
10
votes
1 answer

UITabBarItem in landscape UITabBar in iOS 11

I'm programmatically adding tab bar items to a tab bar however when the tab bar is in landscape mode the tab bar items don't change to the new landscape style with the icon on the left and text on the right. How do I update the style of my tab bar…
Berry Blue
  • 15,330
  • 18
  • 62
  • 113
10
votes
2 answers

Unable to access index of tabBar item using swift

Environment: xcode 6GM, Language Swift. I was setting image color of a tabBar item using this code in xcode 6 beta2 var cameraTab : UITabBarItem = self.tabBar.items[1] as UITabBarItem But now in xcode 6GM it is giving error. Error: [AnyObject]?…
Saqib Omer
  • 5,387
  • 7
  • 50
  • 71
10
votes
5 answers

Changing selected TabBarItem font iOS

I have a TabBar. I am trying to style it so that the titles on the TabBarItems have different fonts for the normal state and the selected state. For normal state I want Helvetica Neue Light and for the selected state I want Helvetica Neue Medium. No…
clocksmith
  • 6,226
  • 3
  • 32
  • 45
10
votes
5 answers

UITabBarItem title position

On searching the web on how to adjust the position of a UITabBarItem title position i ran over this similar post and still wondering how to do that. Is it even possible to adjust the title position a bit from the bottom up? (for example 5px) I need…
user944351
  • 1,213
  • 2
  • 19
  • 27
9
votes
3 answers

Changing selectedImage on UITabBarItem in Swift

I've been trying to change the selected image on a UITabBar. I've followed procedures listed on other Stackoverflow questions, but nothing seems to work. I have tried setting the image through the User Defined Runtime Attributes section, as well as…
matcartmill
  • 1,573
  • 2
  • 19
  • 38