As nice as it is to share as much as possible #swiftui between the iPad and iOS, there are still more than a few spots when it makes sense to optimise for either. Checking `UIDevice.current.userInterfaceIdiom` is the way:
”For universal applications, you can use this property to tailor the behavior of your application for a specific type of device.”
https://developer.apple.com/documentation/uikit/uidevice/1620037-userinterfaceidiom
https://developer.apple.com/documentation/uikit/uiuserinterfaceidiom
Still frustrating that I can’t just `#if os(iPadOS)` because although my functions are helpful, they’re not compile friendly.
@bardi why not to use trait collections?
@Mecid good question. Firstly, unfamiliar with the technique, but looking into now. For the Mac it’s a Catalyst-only. So, in this case, do you mean I refer to it to differentiate between iPad and iPhone?
@bardi @Mecid when sizes classes aren't enough, I've found it useful to expose a platform idiom in the environment. This obviously isn't a substitute for platform directives if the API is unavailable, but it's useful to make small UI tweaks.
https://gist.github.com/phillipcaudell/60d5e8c8fe1848b47576356a49719e46