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

TabBarItem Badge Value not shown

I wrote this code, but it seems not working and I don't know why, TabBarItem is the right one, but badge is not shown. let mainStoryboard: UIStoryboard = UIStoryboard(name: "Main", bundle: nil) let tabBarController =…
Daniele
  • 11
  • 3
0
votes
1 answer

UITabBarIcon invisible until the next time tick

I have got a strange problem that may be some of you will be able to explain and thus allow me to fix it. Let me explain what is going on, I have a simple application displaying a UITabBar at the bottom with 5 items. All are set using the interface…
Cedric Gatay
  • 1,553
  • 3
  • 12
  • 17
0
votes
0 answers

Strange uneven UITabBarItem widths?

I have a customized UITabBarController with 4 tabs. The subclass code is as follow: - (void)viewDidLoad { [super viewDidLoad]; [self.viewControllers enumerateObjectsUsingBlock:^(UIViewController *vc, NSUInteger idx, BOOL *stop) { …
Raptor
  • 53,206
  • 45
  • 230
  • 366
0
votes
2 answers

Change Tabbar background color in override func tabBar(tabBar: UITabBar, didSelectItem item: UITabBarItem!)

I need to load tabbar items. Here i need different background colors for tabbar in different tabs . i am changing bar tint color in didSelectItem. But it's background color is not changing . while loading tab bar it is working fine . Here is my…
Afsara
  • 1,411
  • 3
  • 13
  • 31
0
votes
1 answer

Prevent imageInsets from repeating for tabBarItem

I want to set padding (or resizing) for image used for tabBarItem. So in the controller I write the below code: - (instancetype)init { self = [super init]; if (self) { UIImage *i = [UIImage…
Soheil Novinfard
  • 1,358
  • 1
  • 16
  • 43
0
votes
1 answer

Set single tap and double tap actions in UITabBar in iOS 7

I am beginner in iOS app Develop. My problem is, To set different actions in single tab bar item, Single tap and double tap actions are need to be set tab bar item. Is this possible or any better way to solve this problem?
0
votes
0 answers

Alternative way to keep original tabbar icon colors

So I found out about a way to keep tabbar icon colors by putting for item in (self.tabBarController?.tabBar.items as NSArray!){ (item as! UITabBarItem).image = (item as! UITabBarItem).image?.imageWithRenderingMode(.AlwaysOriginal) …
James Chen
  • 387
  • 1
  • 4
  • 17
0
votes
1 answer

NSInvalidArgumentException', reason: '-[UILabel view]: unrecognized selector sent to instance 0x7ffbd0da2680'

Below is the code where i get this error. UIToolbar *toolBar = [[UIToolbar alloc] initWithFrame:CGRectMake(0.0f, self.view.bounds.size.height - 44.0f, self.view.bounds.size.width, 44.0f)]; toolBar.autoresizingMask =…
jeff
  • 157
  • 1
  • 2
  • 8
0
votes
1 answer

iOS) How to add a divider(==separator) between tabbarItems

I searched this question many times but couldn't get enough information. So I will use UIButton or UIView to replace UITabbar for customizing issue. I want to put divider(separator) between two tabbarItems and bottom lines like the image below But…
LKM
  • 2,410
  • 9
  • 28
  • 53
0
votes
2 answers

remove space below the UITabBarItem?

how do I reduce the distance between the two items? my code: -(void)setupRightMenuButton{ filtro = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"icon-filtro-bar"] style:UIBarButtonItemStylePlain target:self…
Felipe Xavier
  • 165
  • 2
  • 13
0
votes
2 answers

Edit background color of specific Tab bar item

Hey i would like to change the background Color of my center tab bar item like instagram in swift, anyone who knows how it works. I googled but can't find any helpful answer.
telip007
  • 27
  • 7
0
votes
2 answers

UIViewController within UIViewControllers

I have a UIViewController that has UITabBar in it. I am trying to imitate a UITabBarController. My question is how do I set or a UIViewController whenever a TabBarItem is selected? I am confused as to how to put a UIViewController inside my…
JayVDiyk
  • 4,277
  • 22
  • 70
  • 135
0
votes
2 answers

UITabBarController background image is not set correctly

I am trying to add UITabBarController programmatically. Everything is working fine but I am having two issues. I am setting tabbar background image but it shows a different image which I dont even have in resources. I am using this image as…
iBug
  • 2,334
  • 3
  • 32
  • 65
0
votes
1 answer

How to set a tab bar item's title from a child view controller in interface builder?

I know programmatically I can set a child view controller's title and it will updated its related tab bar item's title but how do I set that up in Interface Builder?
Steve Moser
  • 7,647
  • 5
  • 55
  • 94
0
votes
2 answers

init UITabbarController in code

Iam making a UITabBarController in code , this is my code var recordsVC = SearchStamViewController() recordsVC.tabBarItem = UITabBarItem(title: "Records", image: nil, selectedImage: nil) var stationsVC =…
user3703910
  • 624
  • 1
  • 5
  • 25