Hiding the tabbar and removing the space
If you’re still seeing a black stripe under your hidden tab bar, have you tried to select Extend Edges Under Opaque Bars here? Make also sure that Under Bottom Bars is still selected. Hope it helps!
If you’re still seeing a black stripe under your hidden tab bar, have you tried to select Extend Edges Under Opaque Bars here? Make also sure that Under Bottom Bars is still selected. Hope it helps!
In your UITabBarController, set isTranslucent = false
I was able to get around the problem by simply calling invalidateIntrinsicContentSize on the UITabBar in viewDidLayoutSubviews. -(void)viewDidLayoutSubviews { [super viewDidLayoutSubviews]; [self.tabBar invalidateIntrinsicContentSize]; } Note: The bottom of the tab bar will need to be contained to the bottom of the main view, rather than the safe area, and the tab bar should have no … Read more
Apple added tab bar customization in iOS 5, and now this kind of stuff is trivial. Prior to this it was a huge hack, and not recommended. Here’s how to do a completely custom tab bar: // custom icons UITabBarItem *item = [[UITabBarItem alloc] init]; item.title = @”foo”; // setting custom images prevents the OS … Read more
I think that automaticallyAdjustsScrollViewInsets only works when your controllers view is a UIScrollView (a table view is one). You’re problem seems to be that your controller’s view is a regular UIView and your UITableView is just a subview, so you’ll have to either: Make the table view the “root” view. Adjust insets manually: UIEdgeInsets insets … Read more
Try adjusting tabBarItem‘s imageInsets (for moving the icon image) and setting the controllers title to nil (so no title is displayed). Put something like this to -init or -viewDidLoad method in view controller: Objective-C self.tabBarItem.imageInsets = UIEdgeInsetsMake(6, 0, -6, 0); self.title = nil; Swift self.tabBarItem.imageInsets = UIEdgeInsets(top: 6, left: 0, bottom: -6, right: 0) self.title … Read more
Is it possible? Sure, but it violates the human interface guidelines. Screenshots: Code: TabController.h: #import <UIKit/UIKit.h> @interface TabController : UITabBarController <UITabBarControllerDelegate> @end TabController.m: #import “TabController.h” @interface TabController () @end @implementation TabController – (void)viewDidLoad { [super viewDidLoad]; self.delegate = self; } – (void)viewWillLayoutSubviews { [super viewWillLayoutSubviews]; [self.tabBar invalidateIntrinsicContentSize]; CGFloat tabSize = 44.0; UIInterfaceOrientation orientation = [UIApplication … Read more
You don’t want your view controller’s base class to be a UITabBarDelegate. If you were to do that, all of your view controller subclasses would be tab bar delegates. What I think you want to do is to extend UITabBarController, something like this: class MyTabBarController: UITabBarController, UITabBarControllerDelegate { then, in that class, override viewDidLoad and … Read more
I faced this issue and I was able to solve it. You have to add following code to your subclass of UITabBarController class. const CGFloat kBarHeight = 80; – (void)viewWillLayoutSubviews { [super viewWillLayoutSubviews]; CGRect tabFrame = self.tabBar.frame; //self.TabBar is IBOutlet of your TabBar tabFrame.size.height = kBarHeight; tabFrame.origin.y = self.view.frame.size.height – kBarHeight; self.tabBar.frame = tabFrame; } … Read more
You should prepare 3 images icons for each tab bar item (1x, 2x and 3x). First create the 3x at 75w 75h pixels (maximum: 144 x 96) and save it as iconTab0@3x.png. Then resize it to 50w 50h pixels (maximum: 96 x 64) and save it as iconTab0@2x.png. Finally resize it to 25w 25h pixels … Read more