Skip to content

Instantly share code, notes, and snippets.

@iskugor
Created April 16, 2014 12:42
Show Gist options
  • Save iskugor/10868171 to your computer and use it in GitHub Desktop.
Save iskugor/10868171 to your computer and use it in GitHub Desktop.
// v1.1.4. https://github.com/viezel/NappDrawer/tree/master/ios/dist
var rootWin = Ti.UI.createWindow({
backgroundColor: "#ccc"
});
rootWin.addEventListener('click', function() {
var NappDrawerModule = require("dk.napp.drawer");
var mainWindow = NappDrawerModule.createDrawer({
centerWindow: Ti.UI.createWindow({ backgroundColor: "#f00" }),
leftWindow: Ti.UI.createWindow({ backgroundColor: "#0f0" }),
rightWindow: Ti.UI.createWindow({ backgroundColor: "#00f" }),
closeDrawerGestureMode: NappDrawerModule.CLOSE_MODE_ALL,
openDrawerGestureMode: NappDrawerModule.OPEN_MODE_ALL,
leftDrawerWidth: 180,
rightDrawerWidth: 220,
statusBarStyle: NappDrawerModule.STATUSBAR_WHITE,
orientationModes: [Ti.UI.PORTRAIT, Ti.UI.UPSIDE_PORTRAIT]
});
mainWindow.open();
setTimeout(function() {
mainWindow.close();
}, 5000);
});
rootWin.open();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment