Developer Docs - Mobile Docs - Context Menu

Display a native context menu that can be attached to nearly any control.

A popular pattern in mobile development is attaching a native menu to a control that opens with a tap or long press. With Rock Mobile, this is not only easy to implement but also highly customizable!

Due to limitations on Android, these are more fleshed out on iOS. We didn't want to take the native iOS features away, so some properties may not translate to Android.  

Getting Started

To get started, we've introduced three controls:

Menu - The top-level menu, can be nested for submenus.

MenuAction - An action that can be taken from the menu (think of this as a Menu item).

Menu

Menu Action

MenuGroup

System Icons

These are only really supported on iOS. These are in the form of SF Symbols, and you should be careful to ensure this only gets set on the iOS platform. You can see examples of this below.

Examples

Default

Opens a Context Menu when the Border is held down.


    
    

Show Menu on Click

In certain cases, you may want the Context Menu to open instantly without a long-press. For this to work properly, the Menu must be attached to a Button.

Click Command