Pulldown Menu won't show in BarButtonItem even while showMenuAsPrimaryAction is selected.

I have set up a pulldown button in the navigation bar which automatically got embedded in a UiBarButtonItem. Menus have been set up from interface builder itself. since UIBarbuttonItem doesn't have a showMenuAsPrimaryAction property.

Now when I run the code on device or simulator, I don't see the menu pop up. Neither on tap nor or long press.

I don't know what I'm doing wrong. Please see the screenshot of storyboard.

The button has no title just an Image which is not seen when double clicked on it (to reveal the menu) in interface builder. So don't be confused with the empty white space in place of the button.

  • In the meanwhile I figured out a way to show a UIMenu directly from the UIBarButtonItem via its menu property.

  • I have also made a post here as to why thedocumentation says the keycommands are fired only for devices with an attached hardware keyboard?

Add a Comment