App build with latest Xcode latest MacOS, deployment is iOS 14.
It seems that in one App update, the search bar moved from centered low near the bottom of the NavigationBar to the right of the rightBarButtons. Previously we saw this:
Now we get this with the exact same code:
I dug around the UINavigationItem documentation, and there is a new property that lets you set the preferred placement:
if (@available(iOS 16.0, *)) {
navigationItem.preferredSearchBarPlacement = UINavigationItemSearchBarPlacementStacked;
}
That restore what our users use to see. But it will only work if the user is on iOS 16 - is there someway to get the old behavior on iOS 14+?
We directly set the navItem's searchBar: navigationItem.searchController = searchController
David
PS: I have to believe something changed in the iOS frameworks that caused this - our code hasn't changed in this area for years.