Popup Button

Do we have access to Popup Buttons in iOS and if so will that be available in Android?

Did you mean popup menu or push button, or some kind of toggle bevel button?

Popup menu :slight_smile:

Not native to Xojo — but you can have one via iOSKit (GitHub - kingj5/iOSKit). You need the PickerView.

Actually the interface guide refers to them as Popup buttons.

It’s done with a UIMenu. Here is a swift tutorial. IOSDesignExtensions might have something to do this already, I’m not sure.

IOSDesignExtensions does not have this yet. But I have it working in two of my apps.

It is more complicated than just an extension so I will make it available in iOSKit. Unless I find an easy way to do it in iOSdesignExtensions

Sorry should have been more clear. UIMenu is in iOSKit already (you added it :slight_smile: ) so we would just need to be able to set the menu property of a button and this should “just work”.

It seems like I’m working on too many features at the moment and don’t even know what I have released :smile:

Just to be clarify, the feature has been added to IOSKit but not ready to access??

iOSKit has a UIMenuView example view that shows how to use UIMenu.


Hi Jeremie. For me it doesn’t work for any iOS version earlier than 14.0. It crashes the simulator when I try 13.0, 13.5 or 13.6.

Thanks Christoph, I just noticed that the declares used to set a button’s menu are only available in iOS14+
Using menus in an older iOS version is impossible.