UITabBar.appearance().scrollEdgeAppearance

Hello devs, is there any way I can Decorate the use scrollEdgeAppearance for the UITabBar appearance so that it compiles in Xcode 13 AND in Xcode 12?

First thing I tried was:

if #available(iOS 15.0, *) {
    UITabBar.appearance().scrollEdgeAppearance
}

But that breaks compilation in Xcode 12.5.1 :-(

I can not use:

if #available(swift 5.5)

as that is not supported.

I would really like to be able to use Xcode 13, without requiring the whole team to upgrade and especially the "team members", which diligently build all kinds of projects automatically at night time.

I can not update them yet, as compiling with Xcode 13 breaks some apps, which is exactly why I need to use the new scrollEdgeAppearance for UITabBar appearance.

Is there any solution to this problem?

Thanks for help

  • So this one line: UITabBar.appearance().scrollEdgeAppearance means really, that either I am forced to use Xcode 13 on every build agent and dev machine or I can not use Xcode 13 on none of the machines, because that will "break" the Tabbar and make the app unusable.

    Not nice. What am I missing? This is ONE line of code and I can not figure out how to deal with the previous version of Xcode from 2 months ago? Really?

Add a Comment