How to stop navigation items from moving into an overflow menu

One screen in my app uses a navigation bar with some buttons added to the titleView and some buttons added as a customView of a single rightBarButtonItem.

In iOS 26 (beta 9), if I switch to the home screen and back again, the titleView and rightBarButtonItem disappear and an overflow button (three dots) appears instead. Nothing happens when I click the overflow button. Here's a screen capture:

https://youtu.be/tthRnMz98kA

This also happens when I switch to another app, when I rotate the device or when I resize the app window. In all cases, there is enough room to show all the buttons, but they still disappear.

I overrode the viewWillTransition function in my view controller and logged when that runs. I can see that if I switch to the home screen and back again before that runs (within one or two seconds), there's no problem. But once that runs, the navigation bar items disappear and the overflow button appears.

I have not done anything to set up the overflow button and don't have any need to use it. The documentation about it isn't very detailed, but it seems like it shouldn't be used unless I add it. This wasn't a problem in iOS 18 or earlier iOS versions.

Does anyone know how to stop this?

BTW, I'm using Swift, but not SwiftUI.

I found the source of my problem. Because iOS 26 puts more space between navigation bar and toolbar items, I had to rework the way I'm adding items to navigation bars and toolbars to preserve the original spacing that my app is designed for. And my new code was adding some empty toolbar items every time it ran. So when I moved my app to the background, or resized its window, empty toolbar items were added that made the visible items no longer fit.

I still don't know how to prevent toolbar items from going into an overflow menu, or how to make the overflow menu actually show the hidden items instead of just doing nothing when clicked. But by stopping the addition of extra toolbar items, the real items really do fit and remain visible as before.

The three dots aren't an overflow tab. They are used to drag the window.

Having the same issue, I cannot find what to do to make the overflow menu decollapse at all.

I still don't know how to prevent toolbar items from going into an overflow menu, or how to make the overflow menu actually show the hidden items instead of just doing nothing when clicked. But by stopping the addition of extra toolbar items, the real items really do fit and remain visible as before.

0  comments

I found out what was going on here in our project. The OS attempts to build a menu out of the overflowed bar button items, but it needs menuRepresentation property (https://developer.apple.com/documentation/uikit/uibarbuttonitemgroup/menurepresentation) to be filled on these buttons to be able to do that.

I still don't know how to prevent toolbar items from going into an overflow menu, or how to make the overflow menu actually show the hidden items instead of just doing nothing when clicked.

[quote='857184022, arlomedia, /thread/799638?answerId=857184022#857184022, /profile/arlomedia']

prevent

prevent

[/quote]

[quote='857184022, arlomedia, /thread/799638?answerId=857184022#857184022, /profile/arlomedia']

prevent

prevent

How to stop navigation items from moving into an overflow menu
 
 
Q