iOS - UITabBarItem long titles overlap using UITabBarAppearance

55 Views Asked by At

Ever since iOS 15+, developers have had to explicitly set the UITabBar Appearance. Before this, longer titles on tabs would dynamically resize a bit to make sure they didn't overlap. Now, they just overlap. We've been handling it by truncating too-long-titles but I want to make sure there's not some way to do this that I've missed.

Our ApplicationDelegate class is in Objective-C so the code for the UITabBar Appearance is here:

UITabBarAppearance *tabBarAppearance = [[UITabBarAppearance alloc] init];
[[UITabBar appearance] performSelector:@selector(setScrollEdgeAppearance:) withObject:tabBarAppearance];

In these pictures you can see tab bar items with the same titles. Before iOS 15, the title text was resized to prevent overlap. But clearly after iOS 15, the third title overlaps. Is there any possible way to reproduce the pre-iOS 15 behavior in terms of tab bar titles, or do we tell our customers "too bad?"

Tab bar items before iOS 15:

Tab bar items before iOS 15

Tab bar items after iOS 15:

Tab bar items after iOS 15

0

There are 0 best solutions below