iOS 11 UIBarButtonItem images not sizing

BarButtonItem (iOS11\xCode9) uses autolayout instead of frames. Try this (Swift): if #available(iOS 9.0, *) { cButton.widthAnchor.constraint(equalToConstant: customViewButton.width).isActive = true cButton.heightAnchor.constraint(equalToConstant: customViewButton.height).isActive = true } Objective C if (@available(iOS 9, *)) { [cButton.widthAnchor constraintEqualToConstant: standardButtonSize.width].active = YES; [cButton.heightAnchor constraintEqualToConstant: standardButtonSize.height].active = YES; }

How can I change the text and icon colors for tabBarItems in iOS 7?

There are two things you need to do for this: 1) If you want to customize the TabBar itself, you need to set the barTintColor for the tabBarController: // this will generate a black tab bar tabBarController.tabBar.barTintColor = [UIColor blackColor]; // this will give selected icons and text your apps tint color tabBarController.tabBar.tintColor = appTintColor; … Read more

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.

Changing tab bar item image and text color iOS

From UITabBarItem class docs: By default, the actual unselected and selected images are automatically created from the alpha values in the source images. To prevent system coloring, provide images with UIImageRenderingModeAlwaysOriginal. The clue is not whether you use UIImageRenderingModeAlwaysOriginal, the important thing is when to use it. To prevent the grey color for unselected items, … Read more

Make custom button on Tab Bar rounded

Solution You need to subclass UITabBarController and then add the button above TabBar‘s view. A button action should trigger UITabBarController tab change by setting selectedIndex. Code The code below only is a simple approach, however for a full supporting iPhone (including X-Series)/iPad version you can check the full repository here: EBRoundedTabBarController class CustomTabBarController: UITabBarController { … Read more