Since

0.1 Menu is a dialog UI that presents a set of alternatives to the user for how to proceed with a given task.

Example

import Menu from '@smartface/native/ui/menu';
import MenuItem from '@smartface/native/ui/menuitem';

var menu = new Menu();
menu.headerTitle = "My Menu Title";
var menuItem1 = new MenuItem({ title: "Menu Item 1" });
var menuItem2 = new MenuItem({ title: "Menu Item 2" });

menuItem1.ios.style = MenuItem.ios.Style.DEFAULT;

menuItem1.onSelected = function() {
console.log("Menu item 1 selected");
};

menuItem2.onSelected = function() {
console.log("Menu item 2 selected");
};

menu.items = [menuItem1, menuItem2];
menu.show(myPage);

Hierarchy

  • Menu

Constructors

Properties

Methods

Constructors

Properties

headerTitle: string

Gets/sets header title of Menu

Property

Android

Ios

Since

0.1

items: MenuItem[]

Gets/sets array of UI.MenuItem of the menu.

Property

Android

Ios

Since

0.1

Methods

  • This function shows menu on the given UI.Page.

    Android

    Ios

    Method

    show

    Since

    0.1

    Parameters

    • page: PageImpl

      This is the page that menu will be shown.

    Returns void

Generated using TypeDoc