I'm working on a UIBarButtonItem
that is supposed to be a filter button - it shows a menu in which the user can (un)check menu items. Using the UIMenuElementAttributesKeepsMenuPresented attribute on the UIActions
prevents the menu to hide after the user clicks an item.
The button is put alongside another button as the leftBarButtonItems
of my navigation item. In iOS 26 they are grouped into a single glass container automatically.
Now when the user starts filtering, I want to highlight the UIBarButton item to signal to the user that the filter is active (similar to what Apple does in the Mail app). I do that by setting the UIBarButtonItemStyle to prominent. Now that works too, but it causes the automatic glass grouping to break up and the menu to hide.
I'm fine with the grouping to break up, but the menu shouldn't hide. Is this a bug or can this be prevented somehow?