Adapter subviews of the titleView have wrong frames. I would open a bug - it feels like no one looking at them, at least none of my previous bugs were addresses... so it feels pointless. Hope this helps someone facing similar issues.
What are you trying to resolve? In general if your getting a _UITAMICAdaptorView
its because UIKit is putting you on a compatibility path. In almost every case, using auto layout will produce significantly better results.
The simplest case is if your custom title view already provides sizing information. If it were using auto layout internally it is likely that we wouldn't have created a _UITAMICAdaptorView
in the first place, so I assume you aren't. If you are overriding intrinsicContentSize
then setting translatesAutoresizingMaskIntoConstraints=true
before you pass us the title view should ensure that we query that. If you aren't doing that, just adding two constraints based on widthAnchor
and heightAnchor
is a very simple way to provide sizing information for a custom view (if you do this we recommend ensuring their priority
is less than Required (aka 1000)).
But even if you make none of those changes, having your view override sizeThatFits:
should ensure reasonable layout, alongside sizing the view to a reasonable size before you pass it to UIKit. But using autolayout will give you more flexibility and better behavior.
But please do file the bug you encountered, although it is very late in the beta cycle so it may be hard to get it fixed for iOS 16. In general the sooner you file bugs the better.