Menus don't work in UIDocumentBrowserViewController additionalTrailingNavigationBarButtonItems

iOS 14 adds menu support to UIBarButtonItems. UIDocumentBrowserViewController lets you add bar button items to the navigation bar via the additionalTrailingNavigationBarButtonItems property. However, adding a bar button item with a menu results in a button whose menu can not be activated by a press or click. (FB8339455)

Anyone have a workaround?

Code Block language objective-c
- (void)viewDidLoad {
    [super viewDidLoad];
    // ...
    UIMenu *menu = [UIMenu menuWithChildren:[self menuElements]];
    self.additionalTrailingNavigationBarButtonItems = @[[[UIBarButtonItem alloc] initWithImage:icon menu:menu]];
}


Wow, one year later I have the same issue and no reply?

My radar is currently open with less than 10 similar reports. If you haven't done so, could you file a dupe?

There is also a Twitter discussion of https://twitter.com/alexbuga/status/1446480077248770052 in case it helps. In my app, I work around the missing functionality with a one-off vc that creates a menu-like table view.

I've submitted a bug report about this as well.

I'm in the same boat ... at least this thread confirms that it's not my code failing (after 2h testing). Any news? I might file a bug report, although I already have a queue of ignored ones...

RADAR filed (FB10874409)...

Menus don't work in UIDocumentBrowserViewController additionalTrailingNavigationBarButtonItems
 
 
Q