Changing tab bar font in Swift

The UITextAttributeFont was deprecated in iOS 7. You should use the NS variant instead: import UIKit let appearance = UITabBarItem.appearance() let attributes = [NSFontAttributeName:UIFont(name: “American Typewriter”, size: 20)] appearance.setTitleTextAttributes(attributes, forState: .Normal)

How to hide UITabBar?

You have to use set the hidesBottomBarWhenPushed property to YES on the controller that you are pushing and NOT to the UITabBarController. otherController.hidesBottomBarWhenPushed = YES; [navigationController pushViewController: otherController animated: TRUE]; Or you can set the property when you first initialize the controller you want to push.

How to change UITabBar Selection color

Update September 2017: It’s been two years since I’ve written this answer and since it’s receiving upvotes regularly, I should say this is probably the worst possible answer to this question, it’s error prone, likely to break because of iOS updates, hard to debug, etc., so please don’t do the things I’ve written and apply … Read more

iOS UITabBar : Remove top shadow gradient line

Similary in answer for this question … if You don’t want to mess with any kind of 1×1 transparent image, this work’s too: [[UITabBar appearance] setBackgroundImage:[[UIImage alloc] init]]; [[UITabBar appearance] setShadowImage:[[UIImage alloc] init]]; In swift: UITabBar.appearance().shadowImage = UIImage() UITabBar.appearance().backgroundImage = UIImage()

UITabBar not showing selected item images in ios 7

You need to use tabBarItem initWithTitle:image:selectedImage [[UITabBarItem alloc] initWithTitle:@”title” image:image selectedImage:imageSel]; in conjunction with changing the UIImage rendering mode: imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal or (to apply parent views template tint mask, this option is default for Tab bar Items unless you opt out with the above rendering mode) imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate here is a code sample for one tab bar … Read more

Setting the default tab when using storyboards

Whilst you can set the initial selected tab programmatically like the other answers, to achieve the same in your storyboard without touching code you would perform the following: Select the Tab Bar Controller in the Storyboard Interface Show the Identity Inspector in the Utilities panel Add a new “User Defined Runtime Attribute” Set the Key … Read more