Questions tagged [uitabbar]

UITabBar is a user interface element in Apple's iOS, which is a bar at the bottom of the screen and has images and/or text representing different views of an application.

UITabBar

UITabBar - iOS Class (Apple Docs)

Class Structure = UITabBar : UIView : UIResponder : NSObject

A UITabBar is a common user interface element used in constructing multi-view applications. Each tab/button may contain text or an image, and when pressed corresponds to a , or a subclass of (such as a ).

Image: screenshot of the UITabBar in Apple's Health application.

UITabBar Example


The object which controls a Tab Bar, is a . This class manages the view swapping that occurs when the user selects another tab.

2318 questions
21
votes
4 answers

Preserving the original image color of the selected and unselected UITabBar icons

The structure is the following: In my storyboard, I have a Tab Bar Controller which contains a Tab Bar object. This object has a custom class in which I have only this method: - (void)awakeFromNib { NSArray *imageNames = @[@"test1", @"test2",…
Alex
  • 2,325
  • 3
  • 29
  • 35
21
votes
4 answers

How to re-order segues in initial view's tabbar controller in xcode 4.5?

How do I reorder the initial view's tabbar controller elements without having to delete all the segues and re connect them manually in the desired order? Is there a way to change the order of these after they have been hooked up? I was able to do…
iamtoc
  • 1,569
  • 4
  • 17
  • 24
20
votes
2 answers

Present ViewController in front of UITabBarController's tabBar and hide this tabBar

In my project I have a UITabBarController. And on one of it's ViewControllers I have button. When I click this button, a new ViewController is presenting modally. The problem is, when the second VC is presenting, tabBarController's tabBar is still…
vanelizarov
  • 1,064
  • 1
  • 8
  • 24
20
votes
18 answers

UITabBar leaves a white rectangle when hidden

I have been unable to google an acceptable solution to this that can be applied to my project. My app is a graphing tool that has three tabs; one for the graph itself and the other two are for browse/search functions for things that can be added to…
Tobster
  • 345
  • 1
  • 3
  • 12
20
votes
3 answers

Tab bar background is missing on iOS 7.1 after presenting and dismissing a view controller

I've tried my app on iOS 7.1 and I found that the tab bar background disappears on a few occasions. I was able to track them down; it happens when: pushing a view controller placed inside navigation controller (that is inside tab bar controller)…
Lukas Petr
  • 1,513
  • 16
  • 19
20
votes
5 answers

UITabBar will hide the last cell of the UITableView

self.tableView = [[UITableView alloc] initWithFrame:CGRectMake(0.0, 0.0, 320.0, [UIScreen mainScreen].bounds.size.height ) style:UITableViewStylePlain]; If I change the tableview frame to (0.0, 0.0, 320.0, [UIScreen mainScreen].bounds.size.height…
jxdwinter
  • 2,339
  • 6
  • 36
  • 56
20
votes
4 answers

UITabBar selectionIndicatorImage padding

I set a custom indicator image for my UITabBar like this UIImage *tabBarSelectedImage = [[UIImage imageNamed:@"tabBar_selected"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 0, 0, 0)]; [[UITabBar appearance]…
Stefan Arn
  • 1,156
  • 12
  • 29
19
votes
5 answers

IOS 8 Tab Bar Item Background Colour

I've been trying to find the solution to this for the last week, and I have had no luck after trying every possible solution I could find or think of. Every solution I found and have attempted has either not worked, or been outdated. I have 5…
user2985289
  • 203
  • 1
  • 3
  • 10
19
votes
9 answers

changing the height of UITabBar in iOS7/8?

I am trying to change the height of the stock UITabBar to 44px, similar to Tweetbot's tab bar height. I've also seen a few other apps do this as well. however, when i try to set the height it still remains the same self.tabBar.frame.height =…
3254523
  • 3,016
  • 7
  • 29
  • 43
18
votes
1 answer

Disable action - user taps on tabbar item to go to root view controller

I want to disable the default action when user taps the tabbar item. For example, i have a tabbar with Tab1, Tab2 and Tab3. In Tab1, user can navigate from View1 to View3 (View1 > View2 > View3). If user is at View3, and he taps the Tab1, the…
Mustafa
  • 20,504
  • 42
  • 146
  • 209
18
votes
11 answers

Remove UITabbar upper border line

I have been using UITabbar in an app. There is an upper border line coming in top of the UITabbar. Refer below image :- I Googled it and tried the suggested code like :- [[UITabBar appearance] setShadowImage:[[UIImage alloc] init]]; Also [[UITabBar…
Awesome.Apple
  • 1,316
  • 1
  • 11
  • 24
18
votes
4 answers

To change the color of unselected UITabBar icon in iOS 7?

I know this question has been asked earlier as well, but still i didn't get any solution searching the solution on internet. I referred the following posts: How can I change the text and icon colors for tabBarItems in iOS 7? Only able to change the…
Vinay Jain
  • 2,644
  • 3
  • 26
  • 44
18
votes
6 answers

iOS 7 TabBar Translucent issue

I have an issue, when I set the translucent box off on a TabBar, there is something blocking some of my view. It looks like it's a sort of extra tab bar or I don't even know. I'm using storyboard. Please see the images attached: With Translucent…
Michael Ortiz
  • 757
  • 1
  • 8
  • 21
18
votes
2 answers

UITabBarItem Image Size

I am making images for my UITabBar. I am making them of size 60x60, because that's what retina screens use. However, when I use that size, it shows up too big in the bar, so you can only see part of the image. When I reduce it down to 30x30, it…
user2397282
  • 3,798
  • 15
  • 48
  • 94
17
votes
4 answers

How to remove programmatically a tab bar item created in parent class NIB file?

Within my iPhone application I have a common tab bar with three tabs that is presented from several views after pressing a button. The approach I followed was the workflow of Tweetie application, described in Robert Conn post. Note that the main…
elitalon
  • 9,191
  • 10
  • 50
  • 86