Skip to content

Instantly share code, notes, and snippets.

@viezel
Forked from raulriera/NappUIHack.js
Last active December 19, 2015 16:38
Show Gist options
  • Save viezel/5984723 to your computer and use it in GitHub Desktop.
Save viezel/5984723 to your computer and use it in GitHub Desktop.
var NappUI = require("NappUI");
NappUI.initNappUI();
// do some Napp UI magic
var view = Ti.UI.createView({
backgroundColor: '#999',
height: 100,
shadow: {
shadowColor: '#000',
shadowRadius: 10,
shadowOffset: { x: 5, y: 5 },
shadowOpacity: 1
},
top: 50,
width: 100
});
// We need to add the following proxies to our project before Napp UI works.
// This is due to some limitations of the Titanium Module SDK
// Please run this after you require the
exports.initNappUI() {
require('dk.napp.ui'); // require the module
// window and tabs
var win1 = Ti.UI.createWindow();
var tb1 = Ti.UI.createTab({window: win1});
var tabGr = Ti.UI.createTabGroup({tabs:[tb1]});
var textf = Ti.UI.createTextField();
// WebView
var webV = Ti.UI.createWebView();
// SearchBar
var SBar = Ti.UI.createSearchBar();
// ScrollableView
var scroV = Ti.UI.createScrollableView();
// Picker
var picker = Ti.UI.createPicker();
// Toolbar
var toolBar = Ti.UI.createToolbar();
// Lets remove this from memory
var win1 = null;
var tb1 = null;
var tabGr = null;
var textf = null;
var webV = null;
var SBar = null;
var scroV = null;
var picker = null;
var toolBar = null;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment