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
1
vote
1 answer

How to customize TabBarItems?

I'm working on customising my TabBarItems. I've changed the height of the TabBar to what I want by doing so: override func viewWillLayoutSubviews() { var tabFrame = self.tabBar.frame tabFrame.size.height = 60 tabFrame.origin.y =…
Recusiwe
  • 1,594
  • 4
  • 31
  • 54
1
vote
3 answers

How would I perform an action when a UITabBarItem is clicked in Swift?

I would like to update my UITableView when a Tab Bar Item is clicked. (I am open to any other better suggestions of how to do this besides when the Tab Bar Item is clicked). Thanks for any help :) Tab Bar Item
Adam Strike
  • 356
  • 1
  • 4
  • 16
1
vote
1 answer

TabBar's background color gets change on tab selection

I don't know why this is happening, I checked it on my storyboard, for my code, I've searched similar questions but didn't find anything. In my tabBar I have 4 tabs, when I selecting tab #2 tabBars background color gets darken but when I select any…
remy boys
  • 2,928
  • 5
  • 36
  • 65
1
vote
0 answers

How to add Image in MoreViewController of Tabbar Controller?

I have more than 6 ViewController in Tabbar controller so it will display 2 tab in moreViewcontroller Tableview Now i dont know how to add image item and title for this 2 tab?? Below is code of My tabbar implemetation NSArray *arrayVC=[[NSArray…
1
vote
1 answer

Change color of unselected tabbar item image without making it original

I have followed this Question it is working fine for UITabBar item text but if I use original images then I am unable to change color for selected UITabBar item image I am changing image tint color and making it original through storyBoard not…
kahna9
  • 35
  • 11
1
vote
3 answers

How can I detect a double tap on UITabBarItem?

I've tried adding a gesture recogniser, not realising that it isn't possible with a UITabBarItem, here is what I did: Any other suggestions?
Omar Sinan
  • 117
  • 2
  • 10
1
vote
1 answer

How to change the iOS UITabBar badge value position?

Here's the code in my AppDelegate.m: RootTableViewController *fcTableViewController = [[RootTableViewController alloc] initWithStyle:UITableViewStylePlain]; fcTableViewController.title =…
FaiChou
  • 767
  • 7
  • 16
1
vote
1 answer

How to make the tabBarItem Image appear small and at the same time not let it get pixelated?

I am trying to find the ideal resolution for a tabBarItem image. I want to keep the image small and not let it pixelate. I tried decreasing the resolution but the image became pixelated. I tried resolution of 60x60. The tabBarItem image had clarity…
MrDank
  • 2,020
  • 2
  • 17
  • 39
1
vote
0 answers

Listen tabs changes from a UITabBar Swift 2.0

I have a UITabBar with two tabs (so one view controller per tab). I want to listen in one of the controllers, when the other tab is pressed because I am implementing the method viewWillDisappear and I want to execute some code only if the view…
Yamila
  • 443
  • 1
  • 9
  • 20
1
vote
0 answers

UITabbarController showing only first tab

I manually added UITabbarController in storyboard which is not root view controller. I added tabbar items to it and set segue relationships. I also set image and title of each tabbar item in code when the first view controller of UITabbarController…
Deepak Sharma
  • 5,577
  • 7
  • 55
  • 131
1
vote
0 answers

Re-Starting Already Selected View on TabBarItemClick

I have a custom UITabBarViewController and on click on the selected tabbaritem, I am trying to re-open/re-start the viewcontroller. This is what it does on selecting a different tabbaritem.. if selectedIndex != currentIndex { let…
senty
  • 12,385
  • 28
  • 130
  • 260
1
vote
0 answers

On click on already selected TabBarItem's View, Restart/Reopen ViewController

I have a TabBarController. It's going through pages when I click on TabBarItems, however if I try to click on the TabBarItem that is already selected, it doesn't do anything, and I couldn't find a way to get the click event either. When I click on…
senty
  • 12,385
  • 28
  • 130
  • 260
1
vote
1 answer

Remove/Hide UITabBarItem in Swift

I have looked really hard for this solution in Swift but am not coming up with one that works for me. I am trying to hide my "Admin" TabBarItem based on the permissions of the person that logs in to the app. I can disable it but it still shows up on…
Michael Williams
  • 1,402
  • 2
  • 14
  • 27
1
vote
0 answers

Crash on tabBarItem.badgeValue

From Fabric we are seeing crashes in the following function: - (void)updateBadgecountForData; { if(self.navigationController.tabBarItem == nil) return; //trying to fix crash if(data == NULL) [self…
Sjoerd Perfors
  • 2,317
  • 22
  • 37
1
vote
1 answer

How to set image in tab bar to full width with resizableImageWithCapInsets

What I'm trying to achieve is to have middle tab image stretched on different resolutions (i5, i6, i6+...), there are 5 tabs so middle one is always 1/5 of screen width. This code is not stretching on full width of middle tab: UITabBarItem…
gvuksic
  • 2,983
  • 3
  • 32
  • 37