This version of Astro is only compatible with Xcode 7.3
Menu

Drawer Plugin

The drawer plugin allows you to add left and right fly-out views.

Sample Usage

Promise.join(DrawerPlugin.init(), WebViewPlugin.init(), function(drawer, webView) {
        var leftMenu = drawer.initLeftMenu(webView);
        leftMenu.open();
});

Methods

DrawerPlugin.init() #

Creates and returns an instance of the drawer plugin that is used to make subsequent method calls.


setContentView(plugin) #

Sets the view for the main content of the drawer to the plugin provided.


initLeftMenu(plugin) #

Sets a plugin's view as the drawer's left menu and returns an object with open(), close(), toggle(), lockClosed() and unlock() methods that control it.

Sample usage:

Promise.join(DrawerPlugin.init(), WebViewPlugin.init(),
    function(drawer, webView) {
        var leftMenu = drawer.initLeftMenu(webView);
        leftMenu.open();
});

initRightMenu(plugin) #

Sets a plugin's view as the drawer's right menu and returns an object with open(), close(), toggle(), lockClosed() and unlock() methods that control it.

Promise.join(DrawerPlugin.init(), WebViewPlugin.init(),
    function(drawer, webView) {
        webView.navigate('http://www.mobify.com');
        var rightMenu = drawer.initRightMenu(webView);
        rightMenu.open();
});

setLeftMenu(plugin) #

Sets a plugin's view as the drawer's left menu.


setRightMenu(plugin) #

Sets a plugin's view as the drawer's right menu.


showLeftMenu() #

Slides the drawer's left menu open.


showRightMenu() #

Slides the drawer's right menu open.


hideLeftMenu() #

Slides the drawer's left menu closed.


hideRightMenu() #

Slides the drawer's right menu closed.


toggleLeftMenu() #

Toggles the open state of the drawer's left menu.


toggleRightMenu() #

Toggles the open state of the drawer's right menu.


lockLeftMenuClosed() #

Locks the left drawer menu. Locking the menu will also close it.


lockRightMenuClosed() #

Locks the right drawer menu. Locking the menu will also close it.


unlockLeftMenu() #

Unlock the left drawer menu.


unlockRightMenu() #

Unlock the right drawer menu.