Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
nLight committed Feb 27, 2013
1 parent 1854999 commit ae8884c
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,32 @@ Titanium Alloy Slide Menu Widget
================================
com.madrocket.ti.slidemenu

Demo app: https://github.com/MadRocket/slidemenu-demo
Platforms:
* ios (tested on emulator)
* android (2.3 tested on device, 4.x on emulator)

Highly inspired by [https://github.com/danielsefton/AlloySliderMenu](https://github.com/danielsefton/AlloySliderMenu)
Drawer can be created from the left, right or both.

Demo app: https://github.com/MadRocket/slidemenu-demo (might be outdated, but you should get the idea)

Usage
-----

In your view:
Assumptions:
* You have views/content.xml for your content
* You have views/leftmenu.xml for the left drawer
* You have views/rightmenu.xml for the right drawer
* You have views/index.xml where you going to assemble application

In your views/index.xml:

<Alloy>
<Window id="index">
<Require type="widget" src="com.madrocket.ti.slidemenu" id="menu" />
</Window>
</Alloy>

In your controller:
In your controllers/index.js:

var content = Alloy.createController('content');
$.menu.init({
Expand All @@ -37,3 +50,5 @@ In your controller:
$.menu.on('close:[right]', function(e){
// Do something on close
});

Highly inspired by [https://github.com/danielsefton/AlloySliderMenu](https://github.com/danielsefton/AlloySliderMenu)

0 comments on commit ae8884c

Please sign in to comment.