I have built my app using new Xcode 9 beta for ios 11. I have found an issue with UITabBar where items are spread through the UITabBar and title is right aligned to the imag
In Addition to John's answer:
If you have more than 4 Tab Bar Items and don't want the "More" Button you have to take a different Size Class. And if you want the original centred layout of items you have to add another method like so:
#import "PreIOS11TabBarController.h"
@interface PreIOS11TabBarController ()
@end
@implementation PreIOS11TabBarController
// In iOS 11, UITabBarItem's have the title to the right of the icon in horizontally regular environments
// (i.e. the iPad). In order to keep the title below the icon, it was necessary to subclass UITabBar and override
// traitCollection to make it horizontally compact.
- (UITraitCollection *)traitCollection {
return [UITraitCollection traitCollectionWithHorizontalSizeClass:UIUserInterfaceSizeClassUnspecified];
}
- (void)viewDidLayoutSubviews {
[super viewDidLayoutSubviews];
self.tabBar.itemPositioning = UITabBarItemPositioningCentered;
}
@end