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
4
votes
2 answers

Setting UITabBarItem image in storyboard but different looking after run app

1) i add four png image in Assets.xcassets. 2)In storyboard, i embed in a Tab Bar Controller. Setting TabBarItem image. 3) But after running app. I found the image look seems a little different with my setting and i don't known why, can anyone…
james
  • 643
  • 4
  • 24
4
votes
2 answers

Set custom images to the UIBarButtonItem but it doesn't show any image

I want to set custom images to the UIBarButtonItem but it only shows a rectangular box around and It doesn't show the actual image. func setupBrowserToolbar() { let browser = UIToolbar(frame: CGRect(x: 0, y: 20, width: self.view.frame.width,…
XIAOHANG
  • 45
  • 6
4
votes
1 answer

Tab Bar Item shows View Controller with modal segue

I have a TabBarController with 5 TabBarItems (build with IB). So far, so good. But, when I tap the second item for example, I want that my second view controller appear with a modal segue. I don’t understand the way to fix it with a…
4
votes
1 answer

Changing Tabbar item title programmatically in viewDidLoad()

I am trying to change the title of the tab item through the below code where I have to write that code in awakeFormNib() however due to some circumstances, I have to change the title in viewdidLoad(). I am using Swift. override func awakeFromNib()…
Saty
  • 2,563
  • 3
  • 37
  • 88
4
votes
1 answer

Creating UITabBarController in Nib instead of Storyboard

I am trying to create a UITabBarController from a Nib. In my project, I do not use Storyboards at all, I prefer going the Nib method, as it makes the project much more managable. So here is what I did so far I create a new CocoaTouch class file and…
JayVDiyk
  • 4,277
  • 22
  • 70
  • 135
4
votes
1 answer

Custom UITabBar with vertically aligned images

Is there a way to make a the UITabBar show just images that fill the entire TabBarItem? I tried simply placing an image and deleting the text in the item's title but the image always appears off-center (the area where the title text was remains and…
Gil
  • 559
  • 6
  • 18
4
votes
3 answers

iOS 8: Selected image for custom tab bar item set in interface builder does not work

I have set in Storyboard tab bar item to be Custom, Image to my outline image and Selected image to my filled image but the selected image does not show up when I run the app. It works if I create a tab bar item programmatically using…
Bartosz Bialecki
  • 4,391
  • 10
  • 42
  • 64
4
votes
2 answers

setTitleTextAttributes doesn't work for UITabBarItem when it is unselected in swift

I am trying to custom my UITabBarController. I have it embedded in my UIViewController, I also created a class for this UITabBarController. override func viewDidLoad() { super.viewDidLoad() //custom tab bar self.tabBar.barTintColor =…
Chongzl
  • 589
  • 1
  • 9
  • 25
4
votes
3 answers

faded, pale background color in UITabBar.background

guys, I am trying to customize UITabBar, but problem is that when I set up simple green background color in UITabBar.background, result is insufficient. Like something lies on background. Here it is look like: UITabBarController is created in…
NikLanf
  • 1,663
  • 1
  • 11
  • 14
4
votes
0 answers

Setting custom divider image in UITabBar using setDividerImage:forLeftState:rightState:

https://developer.apple.com/library/ios/documentation/userexperience/conceptual/UIKitUICatalog/UITabBar.html In the above link Images section "By default, there is no divider image between tabs on a tab bar. You can set custom divider images for…
Mihir
  • 179
  • 3
  • 11
4
votes
2 answers

Change UITabBarItem badge color in iOS 7.1

I am not able to modify the badge color of UItabBarItem in iOS 7.1, So I just added a UILabel to TabBar and set the colour I wanted and got that working in iOS 7.1. But I am not sure if this is the correct way of doing it. I will be submitting my…
CrazyDeveloper
  • 995
  • 1
  • 13
  • 24
4
votes
6 answers

UITabBarItem change badge colour in iOS 7.1

Hi I am trying to change badge colour of UITabBarItem. Below is the code that I am using to achieve the same. The below code works in iOS 7.0. But it is not working in iOS 7.1. Any Help is appreciated. for (UIView* tabBarButton in _tabbar.subviews)…
CrazyDeveloper
  • 995
  • 1
  • 13
  • 24
4
votes
1 answer

IOS 7.1 UITabBarItem titlePositionAdjustment and imageInsets

For previous versions of iOS 7 when I needed to shift the position of the title and image (usually an icon) on a UITabBarItem two settings were required. myViewController.tabBarItem.imageInsets = UIEdgeInsetsMake(0, -15, 0,…
Lukas
  • 694
  • 1
  • 9
  • 24
4
votes
1 answer

iPhone - use the Featured Tabbar item image with custom title

I would like to use the "Featured" tabbar item image with a custom title. I have gone through the various questions on SO regarding this and looked everywhere in the SDK frameworks but could not find the PNG for this item. I am using IB to…
lostInTransit
  • 70,519
  • 61
  • 198
  • 274
4
votes
4 answers

Where can I find custom UITabBarSystemItem icons?

Is there a resource out there some place that has custom UITabBarSystemItem icons that others can use. I know you get some from Apple to start, but I would imagine there are a lot more that are very common. I don't see a reason for each person to…
Jason
  • 17,276
  • 23
  • 73
  • 114