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

setTintColor and setSelectedImageTintColor are not working properly together

I am trying to change icon color of tab bar item of my custom tab bar, But setSelectedImageTintColor and setTintColor are not working together. if that code order is [[UITabBar appearance] setSelectedImageTintColor:[UIColor…
Sujay
  • 2,510
  • 2
  • 27
  • 47
6
votes
1 answer

UITabBar and UITabBarItem with specific image @2x for iPhone 5 and iPhone 6

I’m developing a new app and I’m facing some problems to customize the UITabBar and make it work (design) great in iPhone 5 and 6 using @2x image. In the AppDelegate.m, in the didFinishLaunchingWithOptions method, I set the images for background,…
Fernando
  • 1,323
  • 2
  • 12
  • 17
6
votes
2 answers

Tab Bar Item - Selected/Unselected icon

In Xcode 6, you now have the ability to set the icon for a tab item for its selected and unselected states. Please see the descriptions in the images below: and The only problem is that the image for the SELECTED states does not show. It just…
6
votes
2 answers

UITabBar selection indicator image is not taking whole size of tabBar height in ObjectiveC

I am changing setSelectionIndicatorImage and when I run app on iOS 8, I get spacing between image and regular width of tabBar. Is there a way that I can match height of tab bar with setSelectionIndicatorImage? Also I get margin of few pixels on left…
AleksandarNS
  • 265
  • 1
  • 2
  • 15
6
votes
4 answers

Custom action when clicking on UITabBarController

I have a Tab Bar Controller with four navigation controllers added to it. The navigation controllers appear as Tab Bar Items in the Tab Bar Controller. Now I want to add a fifth button to the tab bar, that does not open another view, but triggers…
6
votes
3 answers

detect when a tabBar item is pressed via UITabBarController from App Delegate

I know this question has been asked a few times, but I am still stuck on the case when I have my UITabBarController in my AppDelegate class and viewControllers are set there only as self.tabBarController.viewControllers = …
6
votes
1 answer

UITabBarItem Change Image Height and Width

I have a UITabBarItem without a title and only an image. I was wondering how I can change the image size so it can take up the whole UITabBarItem. I searched all over the internet but found nothing. I tried: UIStoryboard *storyBoard = [UIStoryboard…
Abdullah Shafique
  • 6,878
  • 8
  • 35
  • 70
6
votes
1 answer

iOS: Custom View for UITabBarItem

I would like to be able to use a custom view as a UITabBarItem. I can't seem to find any information about this. I'd like my tab items to be little circular UIViews containing an image. Is this possible? Is there maybe an open source library that…
James Harpe
  • 4,315
  • 8
  • 47
  • 74
6
votes
4 answers

iPhone UITabbar item double-click pops controllers

just found out something: If you have a Tabbar combined with a NavigationController (that has some views on it's stack) and you double click the TabBarItem, the view pops to the first ViewController, whether you like it or not. Is there a way to…
Chris
  • 117
  • 1
  • 8
5
votes
5 answers

Deselect or unselect all tabs in tabbar in iOS 5

I am new to iOS development and I have started with IOS 5 directly. I have created a storyboard which consists of a tabview controller as its rootviewcontroller. I have put 2 tabs to it. I want to deselect/unselect all the tabs initially. How do I…
Nik
  • 2,913
  • 7
  • 40
  • 66
5
votes
3 answers

Double Tap on UITabBarItem to Scroll up and Reload like Twitter App

How do you implement a double tap on UITabBarItem so that it will scroll up the UITableView, like what the Twitter App does? Or any reference for this, will do Thanks
Vincent Bacalso
  • 2,071
  • 4
  • 23
  • 34
5
votes
3 answers

set up an action with a tab bar item - iphone

I don't no if this is possible, but this there a way to treat a tab bar item click like a regular button click(action)? Here's the reason: I have a tab bar in my application, and for most of the tab bar items, I don't change the screen upon a touch,…
coder
  • 10,460
  • 17
  • 72
  • 125
5
votes
0 answers

How to set TabBarIcon color correctly in SwiftUI since .accentColor is deprecated?

It seems quite hard to change the color of the selected UITabBarItem in SwiftUI. To define the design at central place in the app, I tried to use .appearance() to do this, but nothing worked: // Only effects the unselected…
Andrei Herford
  • 17,570
  • 19
  • 91
  • 225
5
votes
4 answers

UITabBarAppearance does not work on iOS15 iPad (title color)

I created a simple demo and only created a UITabBarController's subclass and set in storyboard. I want to set the TabBarButtonItem's title to an orange color when selected and black color when normal. The following code works fine on any iOS version…
ImWH
  • 820
  • 1
  • 7
  • 20
5
votes
2 answers

Custom iOS Tab Bar Selected Color

Is there any way to change the color of the background for when you change the selected tab. I have everything else sorted but i cant think how to do it. Thanks
Ashley Staggs
  • 1,557
  • 9
  • 24
  • 38