This is a terrible decision. Why would Apple go out of its way to make things more complicated? I know people like to joke about Apple hating developers, but when I see things like this, I kind of believe it's true.
Post
Replies
Boosts
Views
Activity
This is a really great solution! Thank you!
Thank you for the response. I looked back at everything again and got it working (see the answer to the post for details).
I filed one (FB14396163) over a month ago, but it hasn't been responded to. Based on prior history with filing feedback, I'm not holding my breath. Public clarification would be helpful. We've already pushed our plans to move to Xcode 16 until next year because of this and a couple of other problems.
For this problem specifically, we'll be writing our own version of UITabViewController as the new behaviors do not work well with the design of our app.
Is a way to disable the new behavior also in the works so we can revert to tabs at the bottom in cases where the new style does not work with the design of the app?
I was able to hack around it. I ended up with two different approaches, depending on whether or not there were other controls in the navigation bar beyond just the title. There seems to be a lot of bugs with navigation bars in Catalyst under macOS 14 that are going unaddressed. They vary depending on the context in which the underlying navigation controller is used. Having to work around all of them leads to spaghetti code that becomes more difficult to maintain.
Did you try setting the preferredBehaviorStyle to .pad for UINavigationBar's appearance? Something like this:
if #available(macCatalyst 16.0, *) { UINavigationBar.appearance().preferredBehavioralStyle = .pad }
We’re staying at Xcode 14.0 because it has the previous Catalyst SDK but we can still take advantage of some new features in iOS. Can’t use Xcode 14.1 until this and the shadow issue with UICollectionView in Catalyst is resolved though.
FB11507444 has the sample project used above, with the exception of the 3rd screenshot with the title bar drawn with UISplitViewController. I will update it with the information above to add more clarity.
If possible, there is another feedback I filed regarding the shadow drawn at the top of a UICollectionView using a list configuration when it it scrolled. This shadow overlays any view that may be shown on top of the collection view, resulting is an ugly visual artifact (FB11612854).