All of these issues appear when the search controller is set on the view controller's navigationItem
and the search controller's searchBar
has its scopeButtonTitles
set.
So far the following issues are affecting my app on iOS/iPadOS 26 as of beta 7:
-
When the
scopeBarActivation
ofUISearchController
is set to.onSearchActivation
, thepreferredSearchBarPlacement
of thenavigationItem
is set to.integratedButton
, and thesearchBarPlacementAllowsToolbarIntegration
is set tofalse
(forcing the search icon to appear in the nav bar), on both iPhones and iPads, the scope buttons never appear. They don't appear when the search is activated. They don't appear when any text is entered into the search bar. FB19771313 -
I attempted to work around that issue by setting the
scopeBarActivation
to.manual
. I then show the scope bar in thedidPresentSearchController
delegate method and hide the scope bar in thewillDismissSearchController
. On an iPhone this works though the display is a bit clunky. On an iPad, the scope bar does appear via the code indidPresentSearchController
, but when any scope bar button is tapped, the search controller is dismissed. This happens when the app is horizontally regular. When the app on the iPad is horizontally compact, the buttons work but the search bar's text is not correctly aligned within the search bar. Quite the mess really. I still need to post a bug report for this issue. But if issue 1 above is fixed then I don't need this workaround. -
When the
scopeBarActivation
ofUISearchController
is set to.onSearchActivation
, thepreferredSearchBarPlacement
of thenavigationItem
is set to.stacked
, and thehidesSearchBarWhenScrolling
property of thenavigationItem
is set tofalse
(always show the search bar), and this is all used in aUITableViewController
, then upon initial display of the view controller on an iPhone or iPad, you are unable to tap on the first row of the table view except on the very bottom of the row. The currently hidden scope bar is stealing the touches. If you activate and then cancel the search (making the scope bar appear and then disappear) then you are able to tap on the first row as expected. The initially hidden scope bar also bleeds through the first row of the table. It's faint but you can tell it's not quite right. Again, this is resolved by activating and then canceling the search once. FB17888632 -
When the
scopeBarActivation
ofUISearchController
is set to.onSearchActivation
, thepreferredSearchBarPlacement
of thenavigationItem
is set tointegrated
or.integratedButton
, and the toolbar is shown, then on iPhones (where the search bar/icon appears in the toolbar) the scope buttons appear (at the top of the screen) the first time the search is activated. But if you cancel the search and then activate it again, the search bar never appears a second (or later) time. On an iPad the search bar/icon appears in the nav bar and you end up with the same issue as #1 above. FB17890125
Issues 3 and 4 were reported against beta 1 and still haven't been fixed. But if issue 1 is resolved on iPhone, iPad, and Mac (via Mac Catalyst), then I personally won't be affected by issues 2, 3, or 4 any more (but of course all 4 issues need to be fixed). And by resolved, I mean that the scope bar appears and disappears when it is supposed to each and every time the search is activated and cancelled (not just the first time). The scope bar doesn't interfere with touch events upon initial display of the view controller. And there are no visual glitches no matter what the horizontal size class is on an iPad.
I really hope the UIKit team can get these resolved before iOS/iPadOS 26 GM.