0.1 Menu is a dialog UI that presents a set of alternatives to the user for how to proceed with a given task.
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);
Gets/sets header title of Menu
0.1
Gets/sets array of UI.MenuItem of the menu.
This function shows menu on the given UI.Page.
show
This is the page that menu will be shown.
Generated using TypeDoc
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