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:
- Any ideas how to get a custom tabbar shadowimage in iOS 13 without using standardAppearance?
- 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.