4

After upgrading to iOS 13, several tab bar related issues have appeared. I have fixed most, but the remaining one is being unable to overrride the tabbar's shadowimage. The following code worked in iOS 12 and lower:

[[UITabBar appearance] setShadowImage:[UIImage imageName:@"CustomTabBarShadowImage"]];

I tried to override it by setting the new "standardAppearance" attributes. That does work, but I use a custom font in my app and no matter what I do, the tabbaritem titles seem to be limited to the tab icon width and therefore cut off.

That leaves 2 questions please:

  1. Any ideas how to get a custom tabbar shadowimage in iOS 13 without using standardAppearance?
  2. How to prevent tabbaritem titles being cut-off when using a custom font? (Note that I set them using the new UITabBarItemStateAppearance methods)

PS: As to number 1, I have found a hack to work around it - I simply add a uiview with frame CGRectMake(0, -0.5, [UIScreen mainScreen].bounds.size.width, 0.5) to the tab bar- ugly but it works.

RunLoop
  • 20,288
  • 21
  • 96
  • 151
  • 1
    PS for anyone finding this experiencing other uitabbar issues in iOS13, the text color of my tabbaritems were also lost. I found a hack around this by using: [[UITabBar appearance] setUnselectedItemTintColor:colorTabBarItem]; – RunLoop Sep 23 '19 at 06:04
  • 1
    It seems that text being cut off is a bug, I've tried setting different paragraph styles and other stuff but nothing helps, the label's width is too small. I've reported the issue using Feedback Assistant and will report progress here. – El Horrible Sep 25 '19 at 09:46

0 Answers0